Last Updated on : 2024-06-29 00:55:46download
Based on the device ID, immediately send an action command to the specified device. When the device is offline, the sending process will fail.
POST: /v2.0/cloud/thing/{device_id}/shadow/actions
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
device_id | String | path | true | The device ID. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
code | String | body | true | The code of the specified device action. |
input_params | String | body | true | The properties of the supported actions and the value of an action that is sent from the cloud to the device. In JSON parsable data, the key is the code obtained by querying the action, and the value is the action value to be changed. |
Parameter name | Type | Description |
---|---|---|
result | JSON | The returned result. Ignore for now. |
success | Boolean | Indicates whether the operation is successful. Valid values:
|
t | Long | The timestamp. |
tid | String | The link ID. |
POST: /v2.0/cloud/thing/2132131*****/shadow/actions
{
"code": "action",
"input_params": "{\"color\":\"red\",\"name\":\"text\"}"
}
{
"tid": "77a9807fb74411edb9d75a827c79edfd",
"result": {
},
"t": 1677574021435,
"success": true
}
For more information, see error code.
For more information, see Limits on API Request Frequency.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback