Skip to content

Selectors

Selectors enable filtering of devices and folder for advanced access patterns.

Device selectors

The device, readings and packets list can be filtered by device using selectors.

The basic schema is by-:type/:identifier, which replaces the :id_or_slug parameter in the device supported endpoints.

Type Description Unique? Examples
id Filters by the device's ID yes /api/v1/devices/by-id/4d51a5ce-c42c-43fc-9c12-9b593ace9b6b
slug Filters by the device's slug per mandate /api/v1/devices/by-slug/watermeter-3818/readings
name Filters by the device's exact name no /api/v1/devices/by-name/WaterMeter 3818/packets
eui Returns devices that have interfaces with this EUI per driver /api/v1/devices/by-eui/27A09137AA01A1
address Returns devices that have interfaces with this address no /api/v1/devices/by-address/1821AA01
server-id Filters by server-id on wmbus bridge driver interfaces per driver /api/v1/devices/by-server-id/1821AA01

When using a non-unique filter, you must cope with the possibility that the resulting packets or readings are from different devices, or the resulting device list has more than one entry.

Device supported endpoints

Folder selectors

The folders can be filtered by using selectors.

The basic schema is by-:type/:identifier, which replaces the :id_or_slug parameter in the folder supported endpoints.

Type Description Unique? Examples
id Filters by the folder's ID yes /api/v1/tags/by-id/4d51a5ce-c42c-43fc-9c12-9b593ace9b6b
slug Filters by the folder's slug per mandate /api/v1/tags/by-slug/watermeters
name Filters by the folders's exact name no /api/v1/tags/by-name/WaterMeters
parent-id Returns folders that have a given parent-id yes /api/v1/tags/by-parent-id/4d51a5ce-c42c-43fc-9c12-9b593ace9b6b
parent-id Returns folders at top-level (no parent) yes /api/v1/tags/by-parent-id/null

Folder supported endpoints