Method: projects.locations.registries.devices.modifyCloudToDeviceConfig

Modifies the configuration for the device, which is eventually sent from the Cloud IoT Core servers. Returns the modified configuration version and its metadata.

HTTP request

POST https://cloudiot.googleapis.com/v1/{name=projects/*/locations/*/registries/*/devices/*}:modifyCloudToDeviceConfig

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
name

string

The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0 or projects/p0/locations/us-central1/registries/registry0/devices/{numId}.

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

  • cloudiot.devices.updateConfig

Request body

The request body contains data with the following structure:

JSON representation
{
  "versionToUpdate": string,
  "binaryData": string,
}
Fields
versionToUpdate

string (int64 format)

The version number to update. If this value is zero, it will not check the version number of the server and will always update the current version; otherwise, this update will fail if the version number found on the server does not match this version number. This is used to support multiple simultaneous updates without losing data.

binaryData

string (bytes format)

The configuration data for the device.

A base64-encoded string.

Response body

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

Authorization Scopes

Requires one of the following OAuth scopes:

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

For more information, see the Auth Guide.

Was this page helpful? Let us know how we did:

Send feedback about...

Google Cloud Internet of Things Core