You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

354 lines
9.7 KiB

  1. {
  2. "auth": {
  3. "oauth2": {
  4. "scopes": {
  5. "https://www.googleapis.com/auth/devstorage.full_control": {
  6. "description": "Manage your data and permissions in Google Cloud Storage"
  7. },
  8. "https://www.googleapis.com/auth/devstorage.read_only": {
  9. "description": "View your data in Google Cloud Storage"
  10. },
  11. "https://www.googleapis.com/auth/devstorage.read_write": {
  12. "description": "Manage your data in Google Cloud Storage"
  13. },
  14. "https://www.googleapis.com/auth/prediction": {
  15. "description": "Manage your data in the Google Prediction API"
  16. }
  17. }
  18. }
  19. },
  20. "basePath": "/prediction/v1.2/",
  21. "baseUrl": "https://www.googleapis.com/prediction/v1.2/",
  22. "batchPath": "batch/prediction/v1.2",
  23. "description": "Lets you access a cloud hosted machine learning service that makes it easy to build smart apps",
  24. "discoveryVersion": "v1",
  25. "documentationLink": "https://developers.google.com/prediction/docs/developer-guide",
  26. "etag": "\"-iA1DTNe4s-I6JZXPt1t1Ypy8IU/y6-9S-Lx_Izdv2KpEj-E5-XRo7s\"",
  27. "icons": {
  28. "x16": "https://www.google.com/images/icons/feature/predictionapi-16.png",
  29. "x32": "https://www.google.com/images/icons/feature/predictionapi-32.png"
  30. },
  31. "id": "prediction:v1.2",
  32. "kind": "discovery#restDescription",
  33. "methods": {
  34. "predict": {
  35. "description": "Submit data and request a prediction",
  36. "httpMethod": "POST",
  37. "id": "prediction.predict",
  38. "parameterOrder": [
  39. "data"
  40. ],
  41. "parameters": {
  42. "data": {
  43. "description": "mybucket%2Fmydata resource in Google Storage",
  44. "location": "path",
  45. "required": true,
  46. "type": "string"
  47. }
  48. },
  49. "path": "training/{data}/predict",
  50. "request": {
  51. "$ref": "Input"
  52. },
  53. "response": {
  54. "$ref": "Output"
  55. },
  56. "scopes": [
  57. "https://www.googleapis.com/auth/prediction"
  58. ]
  59. }
  60. },
  61. "name": "prediction",
  62. "ownerDomain": "google.com",
  63. "ownerName": "Google",
  64. "parameters": {
  65. "alt": {
  66. "default": "json",
  67. "description": "Data format for the response.",
  68. "enum": [
  69. "json"
  70. ],
  71. "enumDescriptions": [
  72. "Responses with Content-Type of application/json"
  73. ],
  74. "location": "query",
  75. "type": "string"
  76. },
  77. "fields": {
  78. "description": "Selector specifying which fields to include in a partial response.",
  79. "location": "query",
  80. "type": "string"
  81. },
  82. "key": {
  83. "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
  84. "location": "query",
  85. "type": "string"
  86. },
  87. "oauth_token": {
  88. "description": "OAuth 2.0 token for the current user.",
  89. "location": "query",
  90. "type": "string"
  91. },
  92. "prettyPrint": {
  93. "default": "true",
  94. "description": "Returns response with indentations and line breaks.",
  95. "location": "query",
  96. "type": "boolean"
  97. },
  98. "quotaUser": {
  99. "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
  100. "location": "query",
  101. "type": "string"
  102. },
  103. "userIp": {
  104. "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
  105. "location": "query",
  106. "type": "string"
  107. }
  108. },
  109. "protocol": "rest",
  110. "resources": {
  111. "hostedmodels": {
  112. "methods": {
  113. "predict": {
  114. "description": "Submit input and request an output against a hosted model",
  115. "httpMethod": "POST",
  116. "id": "prediction.hostedmodels.predict",
  117. "parameterOrder": [
  118. "hostedModelName"
  119. ],
  120. "parameters": {
  121. "hostedModelName": {
  122. "description": "The name of a hosted model",
  123. "location": "path",
  124. "required": true,
  125. "type": "string"
  126. }
  127. },
  128. "path": "hostedmodels/{hostedModelName}/predict",
  129. "request": {
  130. "$ref": "Input"
  131. },
  132. "response": {
  133. "$ref": "Output"
  134. },
  135. "scopes": [
  136. "https://www.googleapis.com/auth/prediction"
  137. ]
  138. }
  139. }
  140. },
  141. "training": {
  142. "methods": {
  143. "delete": {
  144. "description": "Delete a trained model",
  145. "httpMethod": "DELETE",
  146. "id": "prediction.training.delete",
  147. "parameterOrder": [
  148. "data"
  149. ],
  150. "parameters": {
  151. "data": {
  152. "description": "mybucket/mydata resource in Google Storage",
  153. "location": "path",
  154. "required": true,
  155. "type": "string"
  156. }
  157. },
  158. "path": "training/{data}",
  159. "scopes": [
  160. "https://www.googleapis.com/auth/prediction"
  161. ]
  162. },
  163. "get": {
  164. "description": "Check training status of your model",
  165. "httpMethod": "GET",
  166. "id": "prediction.training.get",
  167. "parameterOrder": [
  168. "data"
  169. ],
  170. "parameters": {
  171. "data": {
  172. "description": "mybucket/mydata resource in Google Storage",
  173. "location": "path",
  174. "required": true,
  175. "type": "string"
  176. }
  177. },
  178. "path": "training/{data}",
  179. "response": {
  180. "$ref": "Training"
  181. },
  182. "scopes": [
  183. "https://www.googleapis.com/auth/prediction"
  184. ]
  185. },
  186. "insert": {
  187. "description": "Begin training your model",
  188. "httpMethod": "POST",
  189. "id": "prediction.training.insert",
  190. "parameters": {
  191. "data": {
  192. "description": "mybucket/mydata resource in Google Storage",
  193. "location": "query",
  194. "type": "string"
  195. }
  196. },
  197. "path": "training",
  198. "request": {
  199. "$ref": "Training"
  200. },
  201. "response": {
  202. "$ref": "Training"
  203. },
  204. "scopes": [
  205. "https://www.googleapis.com/auth/devstorage.full_control",
  206. "https://www.googleapis.com/auth/devstorage.read_only",
  207. "https://www.googleapis.com/auth/devstorage.read_write",
  208. "https://www.googleapis.com/auth/prediction"
  209. ]
  210. },
  211. "update": {
  212. "description": "Add new data to a trained model",
  213. "httpMethod": "PUT",
  214. "id": "prediction.training.update",
  215. "parameterOrder": [
  216. "data"
  217. ],
  218. "parameters": {
  219. "data": {
  220. "description": "mybucket/mydata resource in Google Storage",
  221. "location": "path",
  222. "required": true,
  223. "type": "string"
  224. }
  225. },
  226. "path": "training/{data}",
  227. "request": {
  228. "$ref": "Update"
  229. },
  230. "response": {
  231. "$ref": "Training"
  232. },
  233. "scopes": [
  234. "https://www.googleapis.com/auth/prediction"
  235. ]
  236. }
  237. }
  238. }
  239. },
  240. "revision": "20160511",
  241. "rootUrl": "https://www.googleapis.com/",
  242. "schemas": {
  243. "Input": {
  244. "id": "Input",
  245. "properties": {
  246. "input": {
  247. "properties": {
  248. "csvInstance": {
  249. "items": {
  250. "type": "any"
  251. },
  252. "type": "array"
  253. }
  254. },
  255. "type": "object"
  256. }
  257. },
  258. "type": "object"
  259. },
  260. "Output": {
  261. "id": "Output",
  262. "properties": {
  263. "id": {
  264. "type": "string"
  265. },
  266. "kind": {
  267. "default": "prediction#output",
  268. "type": "string"
  269. },
  270. "outputLabel": {
  271. "type": "string"
  272. },
  273. "outputMulti": {
  274. "items": {
  275. "properties": {
  276. "label": {
  277. "type": "string"
  278. },
  279. "score": {
  280. "format": "double",
  281. "type": "number"
  282. }
  283. },
  284. "type": "object"
  285. },
  286. "type": "array"
  287. },
  288. "outputValue": {
  289. "format": "double",
  290. "type": "number"
  291. },
  292. "selfLink": {
  293. "type": "string"
  294. }
  295. },
  296. "type": "object"
  297. },
  298. "Training": {
  299. "id": "Training",
  300. "properties": {
  301. "id": {
  302. "type": "string"
  303. },
  304. "kind": {
  305. "default": "prediction#training",
  306. "type": "string"
  307. },
  308. "modelInfo": {
  309. "properties": {
  310. "classificationAccuracy": {
  311. "format": "double",
  312. "type": "number"
  313. },
  314. "meanSquaredError": {
  315. "format": "double",
  316. "type": "number"
  317. },
  318. "modelType": {
  319. "type": "string"
  320. }
  321. },
  322. "type": "object"
  323. },
  324. "selfLink": {
  325. "type": "string"
  326. },
  327. "trainingStatus": {
  328. "type": "string"
  329. }
  330. },
  331. "type": "object"
  332. },
  333. "Update": {
  334. "id": "Update",
  335. "properties": {
  336. "classLabel": {
  337. "description": "The true class label of this instance",
  338. "type": "string"
  339. },
  340. "csvInstance": {
  341. "description": "The input features for this instance",
  342. "items": {
  343. "type": "any"
  344. },
  345. "type": "array"
  346. }
  347. },
  348. "type": "object"
  349. }
  350. },
  351. "servicePath": "prediction/v1.2/",
  352. "title": "Prediction API",
  353. "version": "v1.2"
  354. }