List Active Devices
Description
List the devices of a product that were active in a calendar month: those that connected at some point in the month, as counted for billing. Use it to check which devices are behind the monthly active device count. The returned list is paginated by device id. If additional devices exist, the HTTP link header will contain a next link for getting the next page. If devices exist before the returned list, the HTTP link header will contain a prev link for getting the previous page.
Request
GET /v1/n5/products/:productId/active-devices
Response
Successful response contains the following JSON formated body:
{
month: string,
devices: {
deviceId: string,
firstSeen: string,
lastSeen: string
}[]
}
Response Status codes:
200 on success
400 for a month not of the form YYYY-MM
Request headers
This request must have the following headers:
Authorization: bearer <ApiKey>X-Nabto-Organization: <organizationId>
Request Query Parameters
This request supports the following query parameters:
monthThe calendar month, YYYY-MM (UTC). Default: the current month.deviceIdFilterOnly return devices whose id contains this text.limitThe pagination page size. Default: 500. Max 10000.cursorWhere to start the listing. This is used with pagination link headers.
Example
Request
curl "https://api.cloud.nabto.com/v1/n5/products/:productId/active-devices" \
-H "Authorization: Bearer <ApiKey>" \
-H "X-Nabto-Organization: <OrganizationId>"
Response
{
"month": "<month>",
"devices": [{
"deviceId": "de-efghijkl",
"firstSeen": "<firstSeen>",
"lastSeen": "<lastSeen>"
},
...],
}
