Downlinks
The 'downlink commands' API allows viewing and creating downlink commands associated with the devices in the system. Administrator or super administrator permissions are required.
GET /downlinks
The GET /downlinks endpoint provides a paginated list of downlink commands, which can be filtered by the following fields:
- 'page' (optional): page number to display.
- 'size' (optional): number of elements per page.
- 'sort' (optional): sorting order of the elements; can be ascending (ASC) or descending (DESC) and is based on any of the attributes by which to filter.
- 'id' (optional): downlink command identifier.
- 'name' (optional): name of the downlink command.
- 'command' (optional): downlink command.
- 'sent' (optional): boolean indicating if the command has been sent.
- 'createDate' (optional): creation date of the command.
- 'createBy' (optional): user responsible for the creation of the command.
- 'sentDate' (optional): date when the command was sent.
- 'port' (optional): port to which the command is sent.
- 'priority' (optional): priority of the command.
- 'device.id' (optional): device identifier.
- 'device.name' (optional): device name.
- 'device.mnemonic' (optional): mnemonic name of the device.
- 'device.contextBrokerId' (optional): identifier in the context broker of the device.
- 'device.network' (optional): network to which the device belongs; there are three possibilities: 'Lora', 'NBIOT', or 'Wifi'.
- 'device.description' (optional): description of the device.
- 'device.vendor' (optional): company selling the device.
- 'device.brand' (optional): brand of the device.
- 'device.model' (optional): model of the device.
- 'device.firmware' (optional)
- 'device.serialNumber' (optional): serial number of the device.
- 'device.heritageId' (optional): inherited identifier of the device.
- 'device.state' (optional): state of the device; there are three states: 'activated', 'disabled', or 'discharged'.
- 'device.stateDate' (optional): date of the last state change of the device.
- 'device.stateBy' (optional): user responsible for the last state change of the device.
- 'device.createDate' (optional): creation date of the device.
- 'device.createBy' (optional): user responsible for the creation of the device.
- 'device.updateDate' (optional): update date of the device.
- 'device.updateBy' (optional): user responsible for the update of the device.
- 'device.template' (optional): boolean indicating if the device is a template.
- 'device.organization' (optional): organization to which the device belongs.
- 'device.type.id' (optional): identifier of the device type.
- 'device.type.name' (optional): name of the device type.
- 'device.type.hasDevices' (optional): whether there are devices associated with this type.
- 'device.type.toBeProcessed' (optional): boolean indicating if this type of device should be processed.
- 'device.type.dashboards.id' (optional): id of an associated dashboard.
- 'device.type.dashboards.title' (optional): title of an associated dashboard.
- 'device.type.dashboards.url' (optional): url of the associated dashboard.
- 'device.type.dashboards.folderId' (optional): id of the folder containing an associated dashboard.
- 'device.type.dashboards.folderTitle' (optional): title of the folder containing an associated dashboard.
- 'device.type.dashboards.folderUid' (optional): uid of the folder containing an associated dashboard.
- 'device.type.dashboards.folderUrl' (optional): url of the folder containing an associated dashboard.
- 'device.verticals.id' (optional): identifier of the vertical.
- 'device.verticals.name' (optional): name of the vertical.
- 'device.verticals.description' (optional): description of the vertical.
- 'device.verticals.dashboards.id' (optional): title of an associated dashboard.
- 'device.verticals.dashboards.title' (optional): id of the folder containing an associated dashboard.
- 'device.verticals.dashboards.url' (optional): url of the associated dashboard.
- 'device.verticals.dashboards.folderId' (optional): id of the folder containing an associated dashboard.
- 'device.verticals.dashboards.folderTitle' (optional): title of the folder containing an associated dashboard.
- 'device.verticals.dashboards.folderUid' (optional): uid of the folder containing an associated dashboard.
- 'device.verticals.dashboards.folderUrl' (optional): url of the folder containing an associated dashboard.
- 'device.tags.id' (optional): identifier of the tag.
- 'device.tags.name' (optional): name of the tag.
- 'device.attributes.id' (optional): identifier of the attribute.
- 'device.attributes.name' (optional): name of the attribute.
- 'device.attributes.type' (optional): attribute type; there are three types: 'Text', 'Number', or 'DateTime'.
- 'device.attributes.unit' (optional): unit of the attribute.
- 'device.attributes.originName' (optional): original name of the attribute.
- 'device.attributeStatics.id' (optional): identifier of the attribute.
- 'device.attributeStatics.name' (optional): name of the attribute.
- 'device.attributeStatics.type' (optional): attribute type; there are three types: 'Text', 'Number', or 'DateTime'.
- 'device.attributeStatics.value' (optional): value of the attribute.
- 'device.attributeStatics.unit' (optional): unit of the attribute.
- 'device.decoder.id' (optional): identifier of the decoder.
- 'device.decoder.name' (optional): name of the decoder.
- 'device.decoder.network' (optional): network to which the decoder belongs; there are three possibilities: 'Lora', 'NBIOT', or 'Wifi'.
- 'device.decoder.vendor' (optional): company selling the decoder.
- 'device.decoder.model' (optional): model of the decoder.
- 'device.decoder.softwareVersion' (optional): software version of the decoder.
- 'device.decoder.code' (optional): code to decode messages from the device or devices to which it is associated.
- 'device.decoder.lnsId' (optional): LNS identifier of the decoder.
- 'device.decoder.codecIdHex' (optional): hexadecimal identifier of the decoder.
- 'device.decoder.description' (optional): description of the decoder.
- 'device.netLora.deveui' (optional)
- 'device.netLora.appeui' (optional)
- 'device.netLora.appkey' (optional)
- 'device.netLora.nwkkey' (optional)
- 'device.loraProfileId' (optional): Lora profile identifier.
- 'device.netNBIoT.deviceId' (optional): NBIOT identifier.
- 'device.netWifi.mac' (optional): mac associated with the device.
GET /downlinks/{id}
The GET /downlinks/{id} endpoint provides the downlink command by its id.
GET /downlinks/device/{id}
The GET /downlinks/device/{id} endpoint provides the downlink command by the identifier of a device.
POST /downlinks
The POST /downlinks endpoint creates a new downlink command and must have the following format:
{
"name": "command1",
"command": "0102AABB",
"idDevice": 1,
"port": 8080,
"priority": 2
}
- 'name' (required): name of the downlink command.
- 'command' (required): downlink command.
- 'idDevice' (required): identifier of the device to which the downlink command is associated.
- 'port' (optional): port to which the command is sent.
- 'priority' (optional): priority of the command.