Last Updated on : 2023-06-15 05:35:08
Report an event of the specified device in the form of an instant message. A message can contain multiple output parameters that need to be perceived and processed externally.
POST: /v1.0/iot-03/3rdcloud/devices/{device_id}/event/report
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
device_id | String | uri | true | The ID of the specified Tuya-enabled device. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
msg_id | String | body | true | The unique identifier of the specified request. The length should not exceed 32 characters. |
data | Object | body | true | The output parameter for the specified event. |
Description of data
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
event_code | String | body | true | The event code as a functional identifier. |
event_time | Long | body | true | The 13-digit standard timestamp when an event occurs. |
output_params | Object | body | false | The output parameter for the specified event. |
Parameter name | Type | Description |
---|---|---|
result | Boolean | The response result. |
code | String | The response code. It is empty when the request succeeded. |
msg | String | The message that is returned if the request fails. It is empty if the request is successful. |
success | Boolean | Indicates whether the request is successful. Valid values:
|
t | Long | The 13-digit timestamp of a response. |
POST: /v1.0/iot-03/3rdcloud/devices/6cf4171005d11e2ca7****/event/report
{
"msg_id": "ed23rty159292****",
"data": {
"event_code": "read_face",
"event_time": 1592920221212,
"output_params": {
"sex": "man",
"age": 23
}
}
}
{
"result": true,
"t": 1650010133685,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback