Device Activity API
The Device Activity API allows clients to retrieve devices that belong to a customer or sub-customer and filter the results by the current device activity status.
The response for each device now includes its activity status, last activity timestamp, and activity state. The activity information is consistent with the data returned by GET /api/device/{deviceId}/activity-state.
- Retrieve all devices assigned to a customer or sub-customer
- Filter the device list by online or offline status
- Check the current activity status of every device in the response
- Retrieve the timestamp of the most recent device activity
- Use activity-state data consistent with
GET /api/device/{deviceId}/activity-state
- Displaying online and offline devices in a management dashboard
- Monitoring device connectivity
- Identifying inactive devices that may require investigation
- Synchronizing device status with an external system
- Auditing device activity for a customer or sub-customer
Both endpoints require a valid bearer token in the X-Authorization header:
X-Authorization: Bearer {token}
Returns the devices assigned to the specified customer.
GET /api/customer/{customerId}/devices
| Parameter | Type | Required | Description |
|---|---|---|---|
customerId |
string | Yes | Customer ID in the Network Server/OAM. |
| Parameter | Type | Required | Description |
|---|---|---|---|
active |
boolean | No | Filters devices by activity status. Use true for online devices or false for offline devices. If omitted, all devices are returned. |
curl -X GET "https://{host}/api/customer/{customerId}/devices" \
-H "accept: application/json" \
-H "X-Authorization: Bearer {token}"
curl -X GET "https://{host}/api/customer/{customerId}/devices?active=true" \
-H "accept: application/json" \
-H "X-Authorization: Bearer {token}"
curl -X GET "https://{host}/api/customer/{customerId}/devices?active=false" \
-H "accept: application/json" \
-H "X-Authorization: Bearer {token}"
Returns the devices assigned to the specified sub-customer.
GET /api/subCustomer/{subCustomerId}/devices
| Parameter | Type | Required | Description |
|---|---|---|---|
subCustomerId |
string | Yes | Sub-customer ID in the Network Server/OAM. |
| Parameter | Type | Required | Description |
|---|---|---|---|
active |
boolean | No | Filters devices by activity status. Use true for online devices or false for offline devices. If omitted, all devices are returned. |
curl -X GET "https://{host}/api/subCustomer/{subCustomerId}/devices" \
-H "accept: application/json" \
-H "X-Authorization: Bearer {token}"
curl -X GET "https://{host}/api/subCustomer/{subCustomerId}/devices?active=true" \
-H "accept: application/json" \
-H "X-Authorization: Bearer {token}"
curl -X GET "https://{host}/api/subCustomer/{subCustomerId}/devices?active=false" \
-H "accept: application/json" \
-H "X-Authorization: Bearer {token}"
| Request | Returned Devices |
|---|---|
No active parameter |
All devices |
active=true |
Online devices only |
active=false |
Offline devices only |
The activity status is determined using the same activity-state logic as GET /api/device/{deviceId}/activity-state.
The following fields are included for every device in the data array:
| Field | Type | Description |
|---|---|---|
active |
boolean | Indicates whether the device is currently online (true) or offline (false). |
lastActivityTime |
integer (int64) | Timestamp of the most recent device activity. The value uses the timestamp format returned by GET /api/device/{deviceId}/activity-state. |
state |
string | Current device activity state. The value is identical to the state returned by GET /api/device/{deviceId}/activity-state. |
Note: If no device activity has been recorded,
lastActivityTimemay benull, depending on the server configuration and API implementation.
The response structure is the same for the customer and sub-customer endpoints.
{
"data": [
{
"abp": true,
"active": true,
"additionalInfo": "string",
"appEUI": "string",
"appKey": "string",
"appSKey": "string",
"appSKeyEncrypted": "string",
"applicationAbp": true,
"applicationId": {
"entityType": "APPLICATION",
"id": "string"
},
"applicationName": "string",
"asKekLabel": "string",
"createdTime": 0,
"customerId": {
"entityType": "CUSTOMER",
"id": "string"
},
"devAddress": "string",
"deviceClass": "CLASS_A",
"deviceEUI": "string",
"deviceModelId": {
"entityType": "DEVICE_MODEL",
"id": "string"
},
"deviceModelName": "string",
"eventThresholdDownlinkQueueSize": 0,
"eventThresholdJoinRequestWithoutUl": 0,
"eventThresholdUlPerMinuteCounter": 0,
"inactivityTimeout": 0,
"lastActivityTime": 1753965296000,
"multicastGroup": true,
"name": "string",
"nsKekLabel": "string",
"nwkSKey": "string",
"nwkSKeyEncrypted": "string",
"previousDevNonces": [
0
],
"providerId": {
"entityType": "PROVIDER",
"id": "string"
},
"sessionKeyId": "string",
"state": "ACTIVE",
"useAppNetworkSettings": true
}
],
"totalElements": 1
}
Important: The
statevalue shown above is illustrative. Clients must use the value returned by the server and should not rely on a fixed set of states unless those states are defined separately in the API specification.
| HTTP Status | Description |
|---|---|
200 OK |
The request was successful. The response contains the matching devices. |
400 Bad Request |
The request contains an invalid parameter value, such as a value other than true or false for active. |
401 Unauthorized |
The authentication token is missing, invalid, or expired. |
403 Forbidden |
The authenticated user does not have permission to access the requested customer or sub-customer. |
404 Not Found |
The specified customer or sub-customer was not found. |
{host}= Network Server or OAM host{token}= valid authentication token{customerId}= Customer ID in the Network Server/OAM{subCustomerId}= Sub-customer ID in the Network Server/OAM{active}= optional boolean activity filter (trueorfalse)
- Existing integrations can continue calling both endpoints without the
activequery parameter. - When the parameter is omitted, the endpoints return devices without filtering by activity status.
- Existing response fields remain unchanged.
- The new
active,lastActivityTime, andstatefields are added to every device object in the response. - The activity data is consistent with
GET /api/device/{deviceId}/activity-state.