Method: projects.models.patch

Updates a specific model resource.

Currently the only supported fields to update are description and defaultVersion.name.

HTTP request

PATCH https://ml.googleapis.com/v1/{name=projects/*/models/*}

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
name

string

Required. The project name.

Authorization requires the following Google IAM permission on the specified resource name:

  • ml.models.update

Query parameters

Parameters
updateMask

string (FieldMask format)

Required. Specifies the path, relative to Model, of the field to update.

For example, to change the description of a model to "foo" and set its default version to "version_1", the updateMask parameter would be specified as description, defaultVersion.name, and the PATCH request body would specify the new value, as follows: { "description": "foo", "defaultVersion": { "name":"version_1" } } In this example, the model is blindly overwritten since no etag is given.

To adopt etag mechanism, include etag field in the mask, and include the etag value in your model resource.

Currently the supported update masks are description, defaultVersion.name, and etag.

A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

Request body

The request body contains an instance of Model.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

Send feedback about...

Cloud Machine Learning Engine (Cloud ML Engine)