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:

Name

Type

Description

Model API Version

id

string

Unique command ID

1.0.1+

device_id

string

Deice ID

1.0.7+

status

string

Current command status:

  • pending
  • in_progress

1.0.1+

name

string

Command name

1.0.1+

parameters

object

Parameters for the command

1.0.1+

name

string / number / boolean / object

Custom parameters for each command

1.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",
      	"checksum": "0x4421233",
      	"signature": "AzggT331"
    }
  }
]
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!