Cancel a session — SDK `stop()` teardown path
Public-key authenticated. Hard-deletes the session row matching `(projectId, externalId)`. Quiet no-op when no row exists — cancellation can race with the first ingest batch arriving. The `(projectId, externalId)` scoping prevents one project's key from cancelling another project's session.
/api/sessions/cancelPublic-key authenticated. Hard-deletes the session row matching (projectId, externalId). Quiet no-op when no row exists — cancellation can race with the first ingest batch arriving. The (projectId, externalId) scoping prevents one project's key from cancelling another project's session.
Header Parameters
Project public key (dp_<32hex>) — created in Settings → Organizations → Project.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X POST "https://loading/api/sessions/cancel" \ -H "x-dozor-public-key: string" \ -H "Content-Type: application/json" \ -d '{ "sessionId": "9b2e1d4c-6a3f-4f8e-9b1d-2c8a4e6f7a90" }'KPI aggregate for the sessions list stats strip GET
VIEWER+. Returns four KPIs scoped to the caller's active org: total sessions, total duration, average duration (rounded), active today (created in the last 24 h). Single SQL round-trip via `$queryRaw` with conditional aggregation.
List tracked users, cursor-paginated GET
VIEWER+. Scoped to the caller's active org. Filters: `?search=` (matches `externalId` OR `customName`, case-insensitive), `?projectIds=`, `?statuses=ONLINE,ACTIVE_24H,...`, `?sort=last-seen|sessions|active-time|newest`, `?sortDir=`. Status is derived (not indexable) — when status filter is active the route over-fetches up to 500 rows and applies it in JS.