Revoke All Sessions

POST /v1/endpoints/{id}/rbac/clients/{client_id}/sessions/revoke-all

End every active session for a client at once. The "panic button" — kicks the user off every device they're logged in on. Combine with PUT .../status with "disabled" or "revoked" if you also want to block future logins.

Use cases:

  • Lost device — kick all sessions in case the laptop is unlocked.
  • Suspected credential leak — invalidate everything before rotating.
  • Offboarding — when removing a user, revoke all + suspend before delete.

Sessions are added to the revocation list; the next request from each one returns 401. New logins still work unless the client is also suspended.

Path parameters

id string (uuid) Req
Endpoint UUID.
client_id int64 Req
Client ID.

Request body

None.

Response (200 OK)

A confirmation object — note there is no revoked-count field.

endpoint_id, client_id int64
Echo of the target identifiers.
message string
"All sessions revoked successfully".

Errors

401 Unauthorized
Missing auth.
403 Forbidden
Caller lacks the endpoints:delete permission in the active account.
404 Not Found
Endpoint doesn't exist or doesn't belong to the calling account.
Request
curl -X POST \ "https://api.ngris.com/v1/endpoints/<uuid>/rbac/clients/11/sessions/revoke-all" \ -H "X-API-KEY: <your_api_key>"
Python — offboard a user
from ngris import Ngris client = Ngris(api_key="<your_api_key>") ep, cid = "<endpoint_uuid>", "11" # 1. Disable so future logins fail client._put_raw( f"/endpoints/{ep}/rbac/clients/{cid}/status", {"status": "disabled"}, ) # 2. Revoke all active sessions result = client._post_raw( f"/endpoints/{ep}/rbac/clients/{cid}/sessions/revoke-all", {}, ) print(result["message"])
Response — 200 OK
{ "endpoint_id": 184, "client_id": 11, "message": "All sessions revoked successfully" }
On this page
Revoke All Sessions
Iris