Device Commands

Device Commands

Device commands, also called Gateway Commands are a certain certain set of predefined command that may apply to a device, given its support for the command. Historically these have applied to gateway type devices instead of endpoint devices, but sometimes apply to cloud native devices also. The device platform may natively support commands, such as restart, but may require configuration of the EdgeIQ service before a command will work.

In order to execute a gateway command on a set of devices in bulk, EdgeIQ has a few options:

Bulk Execute API

The most flexible and programmatic way to create multiple devices is through the API, using the POST /devices/bulk/{gateway_command} request. You provide what is essentially a device template along with a list of unique device identifiers. See the Bulk API documentation for more information.

CSV Upload

It's also possible to define a set of devices for command execution using a CSV file. This file can be uploaded via the /devices/csv_bulk_upload/{gateway_command} endpoint. The endpoint will process 1000 rows at a time, so to upload more, break the devices into multiple files.

PositionFieldDescription
1IDDevice Object ID ('_id' field)
2Company IDDevice Company ID ('company_id' field)
3Device Unique IDDevice Unique ID ('unique_id' field)

NOTE: Either an ID (column 1) OR a Company ID and Device Unique ID (column 2 & 3) are required.

For a template, here is an example file to get you started.