Data
The 'data' API allows viewing the historical and current lists of elements of the Sensor API. Administrator or super administrator permissions are required.
GET /data/current
The GET /data/current endpoint provides a paginated list of devices in their current state, 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.
- 'type' (optional): type of device.
- 'id' (optional): id of the device in the context broker.
- 'q' (optional): query for the device attributes.
- 'organization' (mandatory): organization to which the device belongs.
GET /data/currentCSV
The GET /data/current/CSV endpoint provides a CSV with the paginated list of devices in their current state, 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.
- 'type' (optional): type of device.
- 'id' (optional): id of the device in the context broker.
- 'q' (optional): query for the device attributes.
- 'organization' (mandatory): organization to which the device belongs.
GET /data/historic
The GET /data/historic endpoint provides a paginated historical list of devices, which can be filtered by the following fields:
- 'type' (optional): type of device.
- 'id' (optional): id of the device in the context broker.
- 'attrs' (optional): static and dynamic attributes of the device.
- 'fromDate' (optional): start date.
- 'toDate' (optional): end date.
- 'lastN' (optional): the last N devices.
- 'limit' (optional): maximum number of devices to display.
- 'offset' (optional): number to start showing results from.
- 'organization' (mandatory): organization to which the device belongs.
GET /data/historic/CSV
The GET /data/historic/CSV endpoint provides a CSV with the paginated historical list of devices, which can be filtered by the following fields:
- 'type' (optional): type of device.
- 'id' (optional): id of the device in the context broker.
- 'attrs' (optional): static and dynamic attributes of the device.
- 'fromDate' (optional): start date.
- 'toDate' (optional): end date.
- 'lastN' (optional): the last N devices.
- 'limit' (optional): maximum number of devices to display.
- 'offset' (optional): number to start showing results from.
- 'organization' (mandatory): organization to which the device belongs.
GET /data/types
The GET /data/types endpoint provides a paginated list of device types, 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): identifier of the device type.
- 'name' (optional): name of the device type.
- 'hasDevices' (optional): whether there are devices associated with this type.
- 'dashboards.id' (optional): id of an associated dashboard.
- 'dashboards.title' (optional): title of an associated dashboard.
- 'dashboards.folderId' (optional): id of the folder containing an associated dashboard.
- 'dashboards.folderTitle' (optional): title of the folder containing an associated dashboard.
- 'dashboards.folderUid' (optional): uid of the folder containing an associated dashboard.
- 'dashboards.folderUrl' (optional): url of the folder containing an associated dashboard.
- 'organization' (optional): organization to which the device type belongs.
GET /data/types/{id}
Search for a device type by its id
The GET /data/types/{id} endpoint provides the device type by its id. It can be filtered by:
- 'organization' (mandatory): organization to which the device type belongs.
GET /data/devices
Paginated list of devices with filter
The GET /data/devices endpoint provides a paginated list of devices, 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): device identifier.
- 'name' (optional): device name.
- 'mnemonic' (optional): mnemonic name of the device.
- 'contextBrokerId' (optional): identifier in the context broker of the device.
- 'network' (optional): network to which the device belongs; there are three possibilities: 'Lora', 'NBIOT', or 'Wifi'.
- 'description' (optional): description of the device.
- 'vendor' (optional): company selling the device.
- 'brand' (optional): brand of the device.
- 'model' (optional): model of the device.
- 'firmware' (optional)
- 'serialNumber' (optional): serial number of the device.
- 'heritageId' (optional): inherited identifier of the device.
- 'state' (optional): state of the device; there are three states: 'activated', 'disabled', or 'discharged'.
- 'stateDate' (optional): date of the last state change of the device.
- 'stateBy' (optional): user responsible for the last state change of the device.
- 'createDate' (optional): creation date of the device.
- 'createBy' (optional): user responsible for the creation of the device.
- 'updateDate' (optional): update date of the device.
- 'updateBy' (optional): user responsible for the update of the device.
- 'template' (optional): boolean indicating if the device is a template.
- 'organization' (mandatory): organization to which the device belongs.
- 'type.id' (optional): identifier of the device type.
- 'type.name' (optional): name of the device type.
- 'type.hasDevices' (optional): whether there are devices associated with this type.
- 'type.toBeProcessed' (optional): boolean indicating if this type of device should be processed.
- 'type.dashboards.id' (optional): id of an associated dashboard.
- 'type.dashboards.title' (optional): title of an associated dashboard.
- 'type.dashboards.url' (optional): url of the associated dashboard.
- 'type.dashboards.folderId' (optional): id of the folder containing an associated dashboard.
- 'type.dashboards.folderTitle' (optional): title of the folder containing an associated dashboard.
- 'type.dashboards.folderUid' (optional): uid of the folder containing an associated dashboard.
- 'type.dashboards.folderUrl' (optional): url of the folder containing an associated dashboard.
- 'verticals.id' (optional): identifier of the vertical.
- 'verticals.name' (optional): name of the vertical.
- 'verticals.description' (optional): description of the vertical.
- 'verticals.dashboards.id' (optional): title of an associated dashboard.
- 'verticals.dashboards.title' (optional): id of the folder containing an associated dashboard.
- 'verticals.dashboards.url' (optional): url of the associated dashboard.
- 'verticals.dashboards.folderId' (optional): id of the folder containing an associated dashboard.
- 'verticals.dashboards.folderTitle' (optional): title of the folder containing an associated dashboard.
- 'verticals.dashboards.folderUid' (optional): uid of the folder containing an associated dashboard.
- 'verticals.dashboards.folderUrl' (optional): url of the folder containing an associated dashboard.
- 'tags.id' (optional): tag identifier.
- 'tags.name' (optional): tag name.
- 'attributes.id' (optional): attribute identifier.
- 'attributes.name' (optional): attribute name.
- 'attributes.type' (optional): attribute type; there are three types: 'Text', 'Number', or 'DateTime'.
- 'attributes.unit' (optional): attribute unit.
- 'attributes.originName' (optional): original name of the attribute.
- 'attributeStatics.id' (optional): static attribute identifier.
- 'attributeStatics.name' (optional): static attribute name.
- 'attributeStatics.type' (optional): static attribute type; there are three types: 'Text', 'Number', or 'DateTime'.
- 'attributeStatics.value' (optional): static attribute value.
- 'attributeStatics.unit' (optional): static attribute unit.
- 'decoder.id' (optional): decoder identifier.
- 'decoder.name' (optional): decoder name.
- 'decoder.network' (optional): network to which the decoder belongs; there are three possibilities: 'Lora', 'NBIOT', or 'Wifi'.
- 'decoder.vendor' (optional): company selling the decoder.
- 'decoder.model' (optional): model of the decoder.
- 'decoder.softwareVersion' (optional): software version of the decoder.
- 'decoder.code' (optional): code to decode messages from the device or devices to which it is associated.
- 'decoder.lnsId' (optional): LNS identifier of the decoder.
- 'decoder.codecIdHex' (optional): hexadecimal identifier of the decoder.
- 'decoder.description' (optional): description of the decoder.
- 'netLora.deveui' (optional)
- 'netLora.appeui' (optional)
- 'netLora.appkey' (optional)
- 'netLora.nwkkey' (optional)
- 'loraProfileId' (optional): Lora profile identifier.
- 'netNBIoT.deviceId' (optional): NBIOT identifier.
- 'netWifi.mac' (optional): mac associated with the device.
GET /data/devices/{id}
The GET /data/devices/{id} endpoint provides the device by its id. It can be filtered by:
- 'organization' (mandatory): organization to which the device belongs.
GET /data/datamodel
The GET /data/datamodel endpoint provides a list of device attributes and device types, which can be filtered by the following fields:
- 'types' (optional): device types to filter by.
- 'devices' (optional): devices to filter by.
- 'organization' (mandatory): organization to filter by.
GET /data/verticals
The GET /data/verticals endpoint provides a paginated list of verticals, 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): vertical identifier.
- 'name' (optional): vertical name.
- 'description' (optional): vertical description.
- 'dashboards.id' (optional): id of an associated dashboard.
- 'dashboards.title' (optional): title of an associated dashboard.
- 'dashboards.url' (optional): url of an associated dashboard.
- 'dashboards.folderId' (optional): id of the folder containing an associated dashboard.
- 'dashboards.folderTitle' (optional): title of the folder containing an associated dashboard.
- 'dashboards.folderUid' (optional): uid of the folder containing an associated dashboard.
- 'dashboards.folderUrl' (optional): url of the folder containing an associated dashboard.
GET /data/verticals/{id}
The GET /data/verticals/{id} endpoint provides the vertical by its id.
GET /data/verticals/orgInUse
The GET /data/verticals/orgInUse endpoint provides a list of verticals belonging to an organization. It can be filtered by:
- 'organization' (mandatory): organization to which the vertical belongs.
GET /data/organizations
The GET /data/organizations endpoint provides a list of organizations.
GET /data/organizations/user
The GET /data/organizations/user endpoint provides a list of organizations to which a user belongs.
GET /data/organizations/admin
The GET /data/organizations/admin endpoint provides a list of organizations to which an administrator belongs.
GET /data/geo/devices
The GET /data/geo/devices endpoint provides a paginated list of devices with geo attributes that 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): device identifier.
- 'type' (optional): type of device.
- 'vertical' (optional): vertical to which the device belongs.
- 'organization' (mandatory): organization to which the device belongs.
GET /data/geo/types
The GET /data/geo/types endpoint provides a list of device types with geo attributes. It can be filtered by:
- 'organization' (mandatory): organization to which the device type belongs.
GET /data/geo/verticals
The GET /data/geo/verticals endpoint provides a list of verticals with geo attributes. It can be filtered by:
- 'organization' (mandatory): organization to which the vertical belongs.