List Client Sessions
GET
/v1/endpoints/{uuid}/rbac/clients/{client_uuid}/sessions
List active and recent sessions for an RBAC client — useful for admin audit views and security reviews ("did this user log in from somewhere unexpected?"). Each session represents one authenticated browser/device connection.
By default only currently-valid sessions (not revoked, not yet expired) are returned. Active sessions can be revoked individually via POST .../sessions/{session_uuid}/revoke or all at once via POST .../sessions/revoke-all.
Path parameters
The RBAC client's uuid. Resolved under this endpoint only.
Deprecated: the legacy integer id is still accepted in the path until the sunset, answered with Deprecation and Sunset headers. Use the uuid.
Query parameters
When true, also include expired sessions. Revoked sessions are always excluded. Default false.
Response (200 OK)
A bare JSON array of session objects (not wrapped in an envelope), ordered by created_at DESC.
The session's public id. Use it in revoke calls.
Owning endpoint and client.
Most recent request from this session.
User-Agent header from login. Omitted if empty.
When the session was revoked, if applicable.
false when revoked or expired.
Deprecated: until the sunset this response also carries the legacy integer id and *_id fields. Don't use them; read uuid and the *_uuid fields.
Errors
An integer client id after the sunset (integer_id_unsupported).
Endpoint doesn't exist or doesn't belong to the calling account, or the client isn't a client of this endpoint (client not found).
curl "https://api.ngris.com/v1/endpoints/019bb1e4-e785-77d2-9966-c3cff31d0a0e/rbac/clients/019b4b9d-d300-736b-8601-153b3d9f70ee/sessions" \
-H "X-API-KEY: <your_api_key>"
from ngris import Ngris
client = Ngris(api_key="<your_api_key>")
sessions = client._get_raw(
"/endpoints/019bb1e4-e785-77d2-9966-c3cff31d0a0e/rbac/clients/019b4b9d-d300-736b-8601-153b3d9f70ee/sessions"
)
for s in sessions:
if s["is_active"]:
print(f"{s['uuid']} {s['ip_address']} ({s.get('user_agent')})")
[
{
"uuid": "019b65dc-c0b3-7240-816e-2a3305e5f5eb",
"endpoint_uuid": "019bb1e4-e785-77d2-9966-c3cff31d0a0e",
"client_uuid": "019b4b9d-d300-736b-8601-153b3d9f70ee",
"created_at": "2026-04-29T11:00:00Z",
"expires_at": "2026-04-30T11:00:00Z",
"last_activity_at": "2026-04-29T13:45:00Z",
"ip_address": "203.0.113.42",
"user_agent": "Mozilla/5.0 (Macintosh) Chrome/123",
"is_active": true
}
]