Devices
List devices with filter and pagination
Authorization
API key Devices: readAuthorizationBearer <token>
API key (sf_...) with any of the required scopes. Generate it in the Spotflow portal on the settings page.
In: header
Scope: Devices: read
Path Parameters
workspaceId*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
sortColumn?null||
ascending?null|boolean
limit?||
Match
^-?(?:0|[1-9]\d*)$Format
int32cursor?null|string
filter?null|
Response Body
application/json
application/problem+json
curl -X POST "https://example.com/workspaces/00000000-0000-0000-0000-000000000001/devices/list" \ -H "Content-Type: application/json" \ -d '{ "sortColumn": "CreatedAt", "ascending": false, "limit": 50, "filter": { "createdAt": [ { "from": "2025-11-01T00:00:00+00:00", "to": "2026-01-01T00:00:00+00:00" } ], "deviceId": [ { "contains": "thermostat" } ], "statusFlags": [ "IsCrashing" ], "firmware": { "firmwareIds": [ "q8Fd53pLn1Yr" ], "firmwareVersionIds": [ "r2Kt75mXc8Vd" ] }, "tags": [ { "tagName": "environment", "equals": "field-test" } ], "cohort": { "in": [ "m3Yg84tDx7Rn" ] } } }'Page of devices matching the filter.
{ "devices": [ { "deviceId": "thermostat-0042", "createdAt": "2025-11-03T07:12:00+00:00", "firmwares": [ { "id": "q8Fd53pLn1Yr", "name": "Thermostat application", "firmwareVersions": [ { "id": "r2Kt75mXc8Vd", "name": "2.4.1" } ] } ], "latestReportedBuildId": "8f3a1c9e2b7d4506", "statusFlags": [], "tags": { "environment": "field-test", "region": "eu-west" }, "cohort": { "id": "m3Yg84tDx7Rn", "name": "Field test devices" } } ], "nextCursor": "eyJvZmZzZXQiOjUwfQ", "hasMore": true, "totalCount": 1840}