modifyCloudToDeviceConfig: projects.locations.registries.devices

Modifies the device’s configuration, which is sent from the ClearBlade IoT Core servers. Returns the modified configuration version and its metadata.

Note: This is a regional API.

You can find the URL, SystemKey, and token required in the call by clicking API Keys (key icon) at the top-right of the Registry Details page. Use the Registry Keys section.

HTTP request

POST {URL}/api/v/4/webhook/execute/{SystemKey}/cloudiot_devices

Query params

Parameters

Parameters

name

string

The device’s name. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0

or

projects/p0/locations/us-central1/registries/registry0/devices/{numId}.

The device’s name can be set to the deviceId or numId (i.e., without the project, location, and registry info. prepended).

method

string

The value must be modifyCloudToDeviceConfig

Header parameters

Parameters

Parameters

ClearBlade-UserToken

See the note at the start of this document on where to find the token.


Request body

The request body contains data with this structure:

JSON representation

JSON representation

{ "versionToUpdate": string, "binaryData": string }

 

Fields

Fields

versionToUpdate

string (int64 format)

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

binaryData

string (bytes format)

The device’s configuration data.

A base64-encoded string.


Response status codes

Code

Meaning

Code

Meaning

200

Success

Response body

If successful, the response body contains a DeviceConfig instance:

{ "version": string, "cloudUpdateTime": string, "deviceAckTime": string, "binaryData": string }