Gateway Commands
A gateway command is a special type of command that is executed on the gateway device. These commands are send to the edge for processing and can be tracked using the unique _id of the gateway command.
To view the status of the command, check the contents of statuses in the gateway command response. Possible status codes include:
sent- command was sent to the gatewayenqueued- command is scheduled for execution at a later timesuccess- command was successfulfail- command failed
In addition to the status code, a status_message will be populated in the case of fail with a more detailed cause.
The following command types are supported (some require additional values in the request body):
send_config- Issues a config requestdata_restriction- Enables data restriction- Enabled flag is required
{ "enable": true }
- Enabled flag is required
backup- Creates a backup of device configurationrestore_backup- Restores a backup created bybackup- Url of backup is required:
{"url": "url-to-backup-file"}
- Url of backup is required:
log_level- Sets the logging level (trace,debug,info,warn,error,critical)- Level is required:
{"level": "debug"}
- Level is required:
log_upload- Uploads logs from the devicereboot- Reboots the deviceheartbeat- Sends a heartbeat request to the devicesoftware_update- Executes a software update- ID of software update is required:
{"software_update_id": "<ID>"}
- ID of software update is required:
status- Sends a status request to the device