Device Status
Device status provides real-time information about device availability and connectivity. This is essential for determining whether devices can respond to requests or stream video.
Accessing Device Status
Status information can be retrieved in two ways:
- During device discovery using the
includeparameter:GET https://api.amazonvision.com/v1/devices?include=status Authorization: Bearer <access_token> - Individual device status:
GET https://api.amazonvision.com/v1/devices/{device_id}/status Authorization: Bearer <access_token>
Response Structure
{
"meta": {
"time": "2025-07-07T10:30:00Z"
},
"data": {
"type": "device-status",
"id": "xxxyyy.status",
"attributes": {
"online": true
}
}
}
Status Attributes
Online Status
- online: Boolean indicating if the device is currently connected
- Primary indicator for device availability
- Essential for determining if live streaming or commands will work
Usage Patterns
Checking Device Availability
def is_device_available(device_status):
return device_status.get('attributes', {}).get('online', False)
def can_stream_video(device_id, device_status):
if is_device_available(device_status):
return True
else:
print(f"Device {device_id} is offline - streaming not available")
return False
Best Practices
- Check before operations: Always verify device is online before attempting video streaming or configuration changes
- Handle offline gracefully: Provide appropriate user feedback when devices are offline
- Cache appropriately: Status can change frequently, so don't cache for extended periods
- Monitor status changes: Consider implementing status monitoring for critical operations
Error Scenarios
When devices are offline:
- Live video streaming will fail
- Configuration changes may not be applied immediately
- Motion detection may not trigger notifications
- Historical video may still be available depending on cloud storage

