Execute Gateway Command on a device

Execute Gateway Command on a device

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Body Params
string
enum

The type of command.

Allowed:
payload
object

The payload that is sent to the device. Not all commands require a payload. For a command of a protocol adapter device (TR-069) the secret values it carries are sent to the device but not kept: the command shows '[REDACTED]' in their place, and so does the token of a signed file URL (the Nonce and Authorization of a download or upload URL).

string

For an update_firmware command of a protocol adapter device (TR-069): the URL the device downloads the firmware image from (a Download of file type 1 Firmware Upgrade Image). It must be an http or https URL without credentials, at most 256 characters (the adapter refuses anything else).

string

For a protocol_request command of a protocol adapter device (TR-069): the name of the RPC of the device's protocol, for example SetParameterValues.

params
object

Parameters of a command of a protocol adapter device (TR-069).

For protocol_request: the arguments of the RPC named in 'rpc'.

For setting: 'values' (an object of parameter names or concepts, for example 'wifi.ssid[0]', to a string, number or boolean), 'add_objects' and 'delete_objects' (arrays of object paths). At least one of the three is required, names and paths must not be empty, and no other key is accepted. Objects added by the command are referred to as '{added[0]}' in 'values'. The adapter applies its own limits (200 entries per list, object paths that start at the root and end in a dot).

For setting_fetch: 'names', an array of concepts, parameter paths or partial paths (ending in a dot); at least one is required, no other key is accepted.

Secret values (a Wi-Fi passphrase, a password: the parameters whose name says so) are sent to the device and are not stored: the gateway command that is stored, published and returned by the API shows '[REDACTED]' in their place, and the credential of a URL in it (the Nonce and Authorization of a signed file URL, the signature of a pre-signed URL) is replaced the same way. Such a command cannot be retried (400): send it again as a new command. A file transfer command that has no secret but its signed URL can be retried; the retry signs a new URL.

boolean
Defaults to false

Only for the commands setting, reset, file_to_device and protocol_request of a protocol adapter device (TR-069). Lets the adapter act on sensitive parameters (DNS servers, Wi-Fi security keys, the accounts of the device), reset the device, or transfer a configuration file. It is not an administrator's privilege: whoever may issue the command to the device may set it (the ability of the command itself, on the device's company or one below the user's). A rule or a scheduled job that carries it is checked against its owner. A bulk command, and a fleet issue_command action whose gateway_command_request carries it (the action sends that whole request to each device of the fleet), are checked per device against the requester: a device whose company the requester may not issue the command to fails with a permission error, the others get the command. Other commands ignore it. Writes to the ManagementServer object are always refused by the adapter.

schedule
object

GatewayCommandSchedules define when a GatewayCommand can be executed. Note that this currently applies only to software update type gateway commands.

integer

The number of seconds before the command will be aborted.

string

The _id of the device that will receive the command.

string

The _id of the setting that will receive the command.

string

The _id of the command that will receive the gateway command.

string

The _id of the software update to use for the command. This value is only required when issuing a software_update command.

attached_device_ids
array of strings

Allows for targeting specific attached device _id's via the gateway device.

attached_device_ids
retry_options
object

optional. Details about how to retry this gateway command, where supported

string
enum

The type of LWM2M command (use only with command_type lwm2m_request or lwm2m_file).
For lwm2m_request:

  • 'read', 'observe', 'observe_stop', 'exec' you must specify the LWM2M path in the field 'endpoint'
  • 'write' the path in 'endpoint' and the value in the field 'data'

For lwm2m_file:

  • 'fileupload' to push a file to the device, you must specify the file id in the field 'file_id' and the file path on the device in the field 'filepath'
  • 'filedownload' to get a file from the device, you must specify the file path on the device in the field 'filepath'.
string

the LWM2M path targeted by a gateway_command of type lwm2m_request

the value for a LWM2M command of type 'write'

string

for command of type 'lwm2m_file' the path of the file to retrieve or replace on a device

string

for command of type 'lwm2m_file' and type 'fileupload', the identifier of the file to be pushed to the device

Response
200

OK

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here!