Skip to content

Get a command status
Stable

Request

Retrieves a single command status record by its ID.

Returns the full CommandStatus object for one device's execution of one command, including its current state, the associated device and request IDs, and the reason for its current state.

About Get Command Status This is the most granular status check available for a command's execution on a specific device. Use it once you already have a command status id, typically obtained by filtering GET /commands/v0/status/ down to the record you care about.

Common Use Cases

Checking the current state and reason for one device's execution of a command

Confirming a command has reached a terminal state before considering it complete

Best Practices

Use the reason field to understand why a command failed rather than only checking state

Cache this result briefly rather than polling continuously if the state is already terminal

Workflow

Filter GET /commands/v0/status/ by device or request to find the specific command status id

Call this endpoint with that id for the full record

Security
commands_apiKey
Path
idstringrequired

ID of the command status object

cURL
curl -i -X GET \
  'https://api.esper.io/_mock/openapi/commands/v0/status/{id}/' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Command status information

Bodyapplication/json
codeinteger
messagestring
contentobject(commands_CommandStatus)
Response
{ "code": 0, "message": "string", "content": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "request": "60448f3a-8291-43df-9526-c3d4a574e4d2", "device": "8dca31e6-c85b-4a6b-bfb4-205d45d9b3bd", "state": "Command Queued", "reason": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "command_meta": {} } }