List devices inventories
GET/api/management/v1/inventory/devices
Returns a paged collection of devices and their attributes. Accepts optional search and sort parameters.
Searching
Searching by attributes values is accomplished by appending attribute
filters in the form {scope}/{name}={value} to the query string.
Supported values for scope are:
- inventory: Attributes reported by the device.
- system: Attributes populated by the mender-server.
- identity: Device's identity attributes provided in the device's auth request.
- monitor: Attributes populated by the monitoring add-on.
- tags: User-defined attributes associated with the device.
Using an unsupported value for scope will produce no results from this API except when no scope is present, in which case scope defaults to inventory.
Examples:
# Search for devices with inventory attribute `attr_name_1` and tag attribute `attr_name_2`
GET /devices?inventory/attr_name_1=foo&tags/attr_name_2=100
# Search devices by attribute without scope (inventory scope is used)
GET /devices?attr_name_1=foo
Request
Responses
- 200
- 400
- 500
Successful response.
Response Headers
X-Total-Count
Total number of devices found
Link
Standard page navigation header, supported relations: 'first', 'next', and 'prev'.
Invalid Request.
Internal Server Error.