Get Commands with Children

Return the next commands to be executed by the device and any of its children.

📘

Use the hub_url received in the registration response as your base URL.

📘

This API requires the device to authenticate, see Device Authentication.

Return the next commands to be executed by the device and any of its children.

If the response received from the Send Telemetry API has the command field set to true, the device must call this API to get details on the command to be executed from the server.

The parent telemetry response's command key will not be updated if child devices receive keys - to determine if a child has a pending command, the telemetry response for that child should be checked. This API can still be used to get all the pending commands in bulk.

Multiple commands might be queued. The device requests one command at a time, calling this API again as needed after each command is completed. Upon completion of each command, it notifies the server by calling the Update Command API.

Return Data

Array of items with the following structure:

NameTypeDescriptionModel API Version
idstringUnique command ID1.0.1+
device_idstringDeice ID1.0.7+
statusstringCurrent command status:
_ pending
_ in_progress
1.0.1+
namestringCommand name1.0.1+
parametersobjectParameters for the command1.0.1+
namestring / number / boolean / objectCustom parameters for each command1.0.1+

Return Sample

[
  {
    "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx",
    "device_id": "fbe103c8-...",
    "status": "pending",
    "name": "update_firmware",
    "parameters": {
        "url": "https://s3.amazonaws.com/xxxx.zip",
        "version": "1.3.4"
    }
  }
]
Language
Authorization
Header
URL
Click Try It! to start a request and see the response here!