revokeAllDeviceSessions
mutation · in the family Device fleet
What it does
Kill every live session of one device — the lost-device sweep (usually with suspend).
The lost-device kill switch: revoke every live device session of one Device in one privileged act (compose with suspendDevice to also block re-exchange); reason required — a kill switch never fires silently. Template class A3_DEVICE (hand-derived v30).
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Device fleet — Enrolling, pairing, suspending and retiring the devices at your registers.
Roles that may call it:
- Owner
- Manager
- An API key whose scope allows
api:revokeAllDeviceSessions
What happens
Requires a reason; answers how many sessions died.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
input | RevokeAllDeviceSessionsInput RevokeAllDeviceSessionsInput! | yes | Input for revokeAllDeviceSessions. |
Returns
RevokeAllDeviceSessionsResult RevokeAllDeviceSessionsResult! — The revokeAllDeviceSessions result.
Example request
mutation ExampleRevokeAllDeviceSessions($input: RevokeAllDeviceSessionsInput!) {
revokeAllDeviceSessions(input: $input) {
revokedSessions
}
}Variables:
{
"input": {
"deviceId": "01900000-0000-7000-8000-bdcbb4130000",
"reason": "Correcting a miscount."
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"revokeAllDeviceSessions": {
"revokedSessions": 1
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. Retry: no. (VALIDATION)