How-Tos
Retrieve Offline Devices
Devices going offline can indicate issues like network failures, device malfunctions, or power outages. By using this API, you can:
- Identify devices that are offline.
- Gain insights into the last time each device was online.
- Integrate this data into dashboards for real-time monitoring or periodic reporting.
Example API
- Ensure you have a valid access token. If you do not, please referrer to the authentication section.
- The
devicesAPI provides a filter for device status, it can be accessed with the following example:
curl -X GET https://api.securithings.com/v1/devices?status=offline&limit=100 \
-H "Accept: application/json" \
-H "Authorization: Bearer <token>"bashThe response will contain up to 100 offline devices.
Key fields to note are lastSeen and status.
{
"devices": [
{
"id": "....",
"name": "...",
"vendor": "...",
"model": "...",
"firmwareVersion": "....",
"deviceType": "...",
"compliance": {...},
"network": {...},
"status": "offline",
"lastSeen": "2024-12-31T23:59:59Z",
"deviceSources": [...],
"sites": [...]
},
...
],
"total": 100
}jsonNotes and Limitations
- Data Refresh Rate: The
last_seenfield is updated every minute. Devices that reconnect within this interval may still appear as offline. - Rate Limiting: The API has a rate limit of 1 requests per second. Exceeding this limit will result in a 429 Too Many Requests error.
- Time Zone: All timestamps are in UTC. Ensure your application adjusts for local time zones if necessary.
