Sets the device’s state.
You can find the URL and SystemKey required in the call by clicking on API Keys (key icon) at the top-right of the Registry Details page.
The token required in the call can be found on the Registry Details page or a JWT generated as described here (note the claims required for HTTP calls). Using the JWT is recommended since it is device-specific.
HTTP request
POST {URL}/api/v/4/webhook/execute/{SystemKey}/cloudiotdevice_devices
Query parameters
Parameters | |
---|---|
|
The device’s name. For example, or
The device’s name can be set to the deviceId or numId (i.e., without the project, location, and registry info. prepended). |
|
The value must be |
Header parameters
Parameters | |
---|---|
| See the note at the start of this document on where to find the token. |
Request body
The request body contains data with the following structure:
JSON representation | |
---|---|
{ "state": { object(DeviceState) }, "gatewayInfo": { object(GatewayInfo) } } |
Fields | |
---|---|
|
The device state. |
|
Set if the message is sent through a gateway or a gateway is making the request on behalf of a device. |
Response status codes
Code | Meaning |
---|---|
204 | Success |
Response body
If successful, the response body will be empty.
DeviceState
The device state reported to ClearBlade IoT Core.
JSON representation | |
---|---|
{ "binaryData": string } |
Fields | |
---|---|
|
Data in binary format. A base64-encoded string. |