Query Command Record

Last Updated on : 2023-06-20 14:54:08download

Query execution results based on the returned command record ID.

API address

GET: /v1.0/expand/cmds/{sn}

Request parameter

Parameter name Type IN Required Description
sn String uri true The command record ID.

Return parameter

Parameter name Type Description
result CmdIssueResponse The returned result.

Description of result

Parameter name Type Description
sn String The command record ID.
happen_time Long The time when the command is executed.
message String The description about the command execution.
device_id String The ID of a Tuya device.
process_status Integer The command execution status. Valid values:
  • 1: The command is being sending.
  • 2: The command is sent.
  • 3: Execution succeeded.
  • 4: Execution failed.
  • 5: The instruction execution status is unknown.

Request example

GET: /v1.0/expand/cmds/133****

Return example

{ "result": { "device_id": "6ce****", "happen_time": 1591693362843, "message": "The command is sent", "process_status": 2, "sn": "133****" }, "t": 1551851043862, "success": true }

Error code

For more information, see error code.