List devices
const url = 'http://localhost:3000/api/v1/devices?limit=20&offset=0&cursor=eyJpZCI6IjEyMzQifQ%3D%3D&status=ONLINE&environment=production®ion=us-west';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:3000/api/v1/devices?limit=20&offset=0&cursor=eyJpZCI6IjEyMzQifQ%3D%3D&status=ONLINE&environment=production®ion=us-west' \ --header 'X-API-Key: <X-API-Key>'Retrieves a paginated list of devices with optional filtering by status and labels.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Example
20Maximum number of devices to return
Example
0Number of devices to skip for pagination
Example
eyJpZCI6IjEyMzQifQ==Cursor for cursor-based pagination (alternative to offset)
Example
ONLINEFilter by device status
Filter by device labels (JSON object)
object
Example
{ "environment": "production", "region": "us-west"}Responses
Section titled “ Responses ”List of devices retrieved successfully
object
Array of device objects
object
Unique device identifier (UUID)
Client-provided device identifier
Human-readable device name
Current device status
Device capabilities as reported during onboarding
object
Key-value labels for device organization and filtering
object
Timestamp of last communication from device
Timestamp when device was registered
Timestamp of last device update
Total number of devices matching the filter criteria
Indicates if there are more devices available
Cursor for fetching the next page of results
Example
{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "clientId": "edge-device-001", "name": "Production Edge Gateway 1", "status": "ONLINE", "capabilities": { "cpu": { "cores": 4, "architecture": "arm64" }, "memory": { "total": 8192 }, "containers": { "runtime": "containerd" } }, "labels": { "environment": "production", "region": "us-west", "tier": "edge" }, "lastSeenAt": "2024-01-15T10:30:00Z", "createdAt": "2024-01-01T00:00:00Z", "updatedAt": "2024-01-15T10:30:00Z" } ], "total": 150, "hasMore": true, "nextCursor": "eyJpZCI6IjEyMzQifQ=="}Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions