Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 75 | <h1><a href="ml_v1.html">AI Platform Training & Prediction API</a> . <a href="ml_v1.projects.html">projects</a></h1> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="ml_v1.projects.jobs.html">jobs()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the jobs Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 83 | <code><a href="ml_v1.projects.locations.html">locations()</a></code> |
| 84 | </p> |
| 85 | <p class="firstline">Returns the locations Resource.</p> |
| 86 | |
| 87 | <p class="toc_element"> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 88 | <code><a href="ml_v1.projects.models.html">models()</a></code> |
| 89 | </p> |
| 90 | <p class="firstline">Returns the models Resource.</p> |
| 91 | |
| 92 | <p class="toc_element"> |
| 93 | <code><a href="ml_v1.projects.operations.html">operations()</a></code> |
| 94 | </p> |
| 95 | <p class="firstline">Returns the operations Resource.</p> |
| 96 | |
| 97 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 98 | <code><a href="#explain">explain(name, body=None, x__xgafv=None)</a></code></p> |
| 99 | <p class="firstline">Performs explanation on the data in the request.</p> |
| 100 | <p class="toc_element"> |
Thomas Coffee | 2f24537 | 2017-03-27 10:39:26 -0700 | [diff] [blame] | 101 | <code><a href="#getConfig">getConfig(name, x__xgafv=None)</a></code></p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 102 | <p class="firstline">Get the service account information associated with your project. You need</p> |
| 103 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 104 | <code><a href="#predict">predict(name, body=None, x__xgafv=None)</a></code></p> |
| 105 | <p class="firstline">Performs online prediction on the data in the request.</p> |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 106 | <h3>Method Details</h3> |
| 107 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | <code class="details" id="explain">explain(name, body=None, x__xgafv=None)</code> |
| 109 | <pre>Performs explanation on the data in the request. |
| 110 | AI Platform implements a custom `explain` verb on top of an HTTP POST |
| 111 | method. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 112 | |
| 113 | Args: |
| 114 | name: string, Required. The resource name of a model or a version. |
| 115 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 116 | Authorization: requires the `predict` permission on the specified resource. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 117 | body: object, The request body. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 118 | The object takes the form of: |
| 119 | |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 120 | { # Request for explanations to be issued against a trained model. |
| 121 | "httpBody": { # Message that represents an arbitrary HTTP body. It should only be used for # Required. |
| 122 | # The explanation request body. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 123 | # payload formats that can't be represented as JSON, such as raw binary or |
| 124 | # an HTML page. |
| 125 | # |
| 126 | # |
| 127 | # This message can be used both in streaming and non-streaming API methods in |
| 128 | # the request as well as the response. |
| 129 | # |
| 130 | # It can be used as a top-level request field, which is convenient if one |
| 131 | # wants to extract parameters from either the URL or HTTP template into the |
| 132 | # request fields and also want access to the raw HTTP body. |
| 133 | # |
| 134 | # Example: |
| 135 | # |
| 136 | # message GetResourceRequest { |
| 137 | # // A unique request id. |
| 138 | # string request_id = 1; |
| 139 | # |
| 140 | # // The raw HTTP body is bound to this field. |
| 141 | # google.api.HttpBody http_body = 2; |
| 142 | # } |
| 143 | # |
| 144 | # service ResourceService { |
| 145 | # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 146 | # rpc UpdateResource(google.api.HttpBody) returns |
| 147 | # (google.protobuf.Empty); |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 148 | # } |
| 149 | # |
| 150 | # Example with streaming methods: |
| 151 | # |
| 152 | # service CaldavService { |
| 153 | # rpc GetCalendar(stream google.api.HttpBody) |
| 154 | # returns (stream google.api.HttpBody); |
| 155 | # rpc UpdateCalendar(stream google.api.HttpBody) |
| 156 | # returns (stream google.api.HttpBody); |
| 157 | # } |
| 158 | # |
| 159 | # Use of this type only changes how the request and response bodies are |
| 160 | # handled, all other features will continue to work unchanged. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 161 | "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. |
| 162 | "data": "A String", # The HTTP request/response body as raw binary. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 163 | "extensions": [ # Application specific response metadata. Must be set in the first response |
| 164 | # for streaming APIs. |
| 165 | { |
| 166 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 167 | }, |
| 168 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 169 | }, |
| 170 | } |
| 171 | |
| 172 | x__xgafv: string, V1 error format. |
| 173 | Allowed values |
| 174 | 1 - v1 error format |
| 175 | 2 - v2 error format |
| 176 | |
| 177 | Returns: |
| 178 | An object of the form: |
| 179 | |
| 180 | { # Message that represents an arbitrary HTTP body. It should only be used for |
| 181 | # payload formats that can't be represented as JSON, such as raw binary or |
| 182 | # an HTML page. |
| 183 | # |
| 184 | # |
| 185 | # This message can be used both in streaming and non-streaming API methods in |
| 186 | # the request as well as the response. |
| 187 | # |
| 188 | # It can be used as a top-level request field, which is convenient if one |
| 189 | # wants to extract parameters from either the URL or HTTP template into the |
| 190 | # request fields and also want access to the raw HTTP body. |
| 191 | # |
| 192 | # Example: |
| 193 | # |
| 194 | # message GetResourceRequest { |
| 195 | # // A unique request id. |
| 196 | # string request_id = 1; |
| 197 | # |
| 198 | # // The raw HTTP body is bound to this field. |
| 199 | # google.api.HttpBody http_body = 2; |
| 200 | # } |
| 201 | # |
| 202 | # service ResourceService { |
| 203 | # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 204 | # rpc UpdateResource(google.api.HttpBody) returns |
| 205 | # (google.protobuf.Empty); |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 206 | # } |
| 207 | # |
| 208 | # Example with streaming methods: |
| 209 | # |
| 210 | # service CaldavService { |
| 211 | # rpc GetCalendar(stream google.api.HttpBody) |
| 212 | # returns (stream google.api.HttpBody); |
| 213 | # rpc UpdateCalendar(stream google.api.HttpBody) |
| 214 | # returns (stream google.api.HttpBody); |
| 215 | # } |
| 216 | # |
| 217 | # Use of this type only changes how the request and response bodies are |
| 218 | # handled, all other features will continue to work unchanged. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 219 | "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. |
| 220 | "data": "A String", # The HTTP request/response body as raw binary. |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 221 | "extensions": [ # Application specific response metadata. Must be set in the first response |
| 222 | # for streaming APIs. |
| 223 | { |
| 224 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 225 | }, |
| 226 | ], |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 227 | }</pre> |
| 228 | </div> |
| 229 | |
| 230 | <div class="method"> |
| 231 | <code class="details" id="getConfig">getConfig(name, x__xgafv=None)</code> |
| 232 | <pre>Get the service account information associated with your project. You need |
| 233 | this information in order to grant the service account permissions for |
| 234 | the Google Cloud Storage location where you put your model training code |
| 235 | for training the model with Google Cloud Machine Learning. |
| 236 | |
| 237 | Args: |
| 238 | name: string, Required. The project name. (required) |
| 239 | x__xgafv: string, V1 error format. |
| 240 | Allowed values |
| 241 | 1 - v1 error format |
| 242 | 2 - v2 error format |
| 243 | |
| 244 | Returns: |
| 245 | An object of the form: |
| 246 | |
| 247 | { # Returns service account information associated with a project. |
| 248 | "serviceAccountProject": "A String", # The project number for `service_account`. |
| 249 | "config": { |
| 250 | "tpuServiceAccount": "A String", # The service account Cloud ML uses to run on TPU node. |
| 251 | }, |
| 252 | "serviceAccount": "A String", # The service account Cloud ML uses to access resources in the project. |
| 253 | }</pre> |
| 254 | </div> |
| 255 | |
| 256 | <div class="method"> |
| 257 | <code class="details" id="predict">predict(name, body=None, x__xgafv=None)</code> |
| 258 | <pre>Performs online prediction on the data in the request. |
| 259 | |
| 260 | <div>{% dynamic include "/ai-platform/includes/___predict-request" %}</div> |
| 261 | |
| 262 | Args: |
| 263 | name: string, Required. The resource name of a model or a version. |
| 264 | |
| 265 | Authorization: requires the `predict` permission on the specified resource. (required) |
| 266 | body: object, The request body. |
| 267 | The object takes the form of: |
| 268 | |
| 269 | { # Request for predictions to be issued against a trained model. |
| 270 | "httpBody": { # Message that represents an arbitrary HTTP body. It should only be used for # |
| 271 | # Required. The prediction request body. Refer to the [request body details |
| 272 | # section](#request-body-details) for more information on how to structure |
| 273 | # your request. |
| 274 | # payload formats that can't be represented as JSON, such as raw binary or |
| 275 | # an HTML page. |
| 276 | # |
| 277 | # |
| 278 | # This message can be used both in streaming and non-streaming API methods in |
| 279 | # the request as well as the response. |
| 280 | # |
| 281 | # It can be used as a top-level request field, which is convenient if one |
| 282 | # wants to extract parameters from either the URL or HTTP template into the |
| 283 | # request fields and also want access to the raw HTTP body. |
| 284 | # |
| 285 | # Example: |
| 286 | # |
| 287 | # message GetResourceRequest { |
| 288 | # // A unique request id. |
| 289 | # string request_id = 1; |
| 290 | # |
| 291 | # // The raw HTTP body is bound to this field. |
| 292 | # google.api.HttpBody http_body = 2; |
| 293 | # } |
| 294 | # |
| 295 | # service ResourceService { |
| 296 | # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); |
| 297 | # rpc UpdateResource(google.api.HttpBody) returns |
| 298 | # (google.protobuf.Empty); |
| 299 | # } |
| 300 | # |
| 301 | # Example with streaming methods: |
| 302 | # |
| 303 | # service CaldavService { |
| 304 | # rpc GetCalendar(stream google.api.HttpBody) |
| 305 | # returns (stream google.api.HttpBody); |
| 306 | # rpc UpdateCalendar(stream google.api.HttpBody) |
| 307 | # returns (stream google.api.HttpBody); |
| 308 | # } |
| 309 | # |
| 310 | # Use of this type only changes how the request and response bodies are |
| 311 | # handled, all other features will continue to work unchanged. |
| 312 | "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. |
| 313 | "data": "A String", # The HTTP request/response body as raw binary. |
| 314 | "extensions": [ # Application specific response metadata. Must be set in the first response |
| 315 | # for streaming APIs. |
| 316 | { |
| 317 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 318 | }, |
| 319 | ], |
| 320 | }, |
| 321 | } |
| 322 | |
| 323 | x__xgafv: string, V1 error format. |
| 324 | Allowed values |
| 325 | 1 - v1 error format |
| 326 | 2 - v2 error format |
| 327 | |
| 328 | Returns: |
| 329 | An object of the form: |
| 330 | |
| 331 | { # Message that represents an arbitrary HTTP body. It should only be used for |
| 332 | # payload formats that can't be represented as JSON, such as raw binary or |
| 333 | # an HTML page. |
| 334 | # |
| 335 | # |
| 336 | # This message can be used both in streaming and non-streaming API methods in |
| 337 | # the request as well as the response. |
| 338 | # |
| 339 | # It can be used as a top-level request field, which is convenient if one |
| 340 | # wants to extract parameters from either the URL or HTTP template into the |
| 341 | # request fields and also want access to the raw HTTP body. |
| 342 | # |
| 343 | # Example: |
| 344 | # |
| 345 | # message GetResourceRequest { |
| 346 | # // A unique request id. |
| 347 | # string request_id = 1; |
| 348 | # |
| 349 | # // The raw HTTP body is bound to this field. |
| 350 | # google.api.HttpBody http_body = 2; |
| 351 | # } |
| 352 | # |
| 353 | # service ResourceService { |
| 354 | # rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); |
| 355 | # rpc UpdateResource(google.api.HttpBody) returns |
| 356 | # (google.protobuf.Empty); |
| 357 | # } |
| 358 | # |
| 359 | # Example with streaming methods: |
| 360 | # |
| 361 | # service CaldavService { |
| 362 | # rpc GetCalendar(stream google.api.HttpBody) |
| 363 | # returns (stream google.api.HttpBody); |
| 364 | # rpc UpdateCalendar(stream google.api.HttpBody) |
| 365 | # returns (stream google.api.HttpBody); |
| 366 | # } |
| 367 | # |
| 368 | # Use of this type only changes how the request and response bodies are |
| 369 | # handled, all other features will continue to work unchanged. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 370 | "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. |
| 371 | "data": "A String", # The HTTP request/response body as raw binary. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 372 | "extensions": [ # Application specific response metadata. Must be set in the first response |
| 373 | # for streaming APIs. |
| 374 | { |
| 375 | "a_key": "", # Properties of the object. Contains field @type with type URL. |
| 376 | }, |
| 377 | ], |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 378 | }</pre> |
| 379 | </div> |
| 380 | |
| 381 | </body></html> |