Gateway Commands

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 gateway
  • enqueued - command is scheduled for execution at a later time
  • success - command was successful
  • fail - 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 request
  • data_restriction - Enables data restriction
    • Enabled flag is required { "enable": true }
  • backup - Creates a backup of device configuration
  • restore_backup - Restores a backup created by backup
    • Url of backup is required: {"url": "url-to-backup-file"}
  • log_level - Sets the logging level (trace, debug, info, warn, error, critical)
    • Level is required: {"level": "debug"}
  • log_upload - Uploads logs from the device
  • reboot - Reboots the device
  • heartbeat - Sends a heartbeat request to the device
  • software_update - Executes a software update
    • ID of software update is required: {"software_update_id": "<ID>"}
  • status - Sends a status request to the device