Events
Count events
Authorization
API key Logs: readAuthorizationBearer <token>
API key (sf_...) with any of the required scopes. Generate it in the Spotflow portal on the settings page.
In: header
Scope: Logs: read
Path Parameters
workspaceId*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
filter*
intervalSeconds?||
Match
^-?(?:0|[1-9]\d*)$Format
int32Response Body
application/json
application/problem+json
curl -X POST "https://example.com/workspaces/00000000-0000-0000-0000-000000000001/events/counts" \ -H "Content-Type: application/json" \ -d '{ "filter": { "fromTimestamp": "2026-01-12T00:00:00+00:00", "toTimestamp": "2026-01-13T00:00:00+00:00", "severity": [ "Error", "Critical" ], "device": [ { "contains": "thermostat" } ], "body": [ { "contains": "timeout" } ], "eventType": [ "Log", "CrashReport" ], "labels": { "component": [ { "equals": "network" } ] }, "firmware": { "firmwareIds": [ "q8Fd53pLn1Yr" ], "firmwareVersionIds": [ "r2Kt75mXc8Vd" ] } }, "intervalSeconds": 3600 }'Event counts per interval and severity.
{ "counts": [ { "count": 18, "timestamp": "2026-01-12T13:00:00+00:00", "severity": "Error" }, { "count": 2, "timestamp": "2026-01-12T13:00:00+00:00", "severity": "Critical" }, { "count": 25, "timestamp": "2026-01-12T14:00:00+00:00", "severity": "Error" } ], "totalCount": 45}