Admin API: Sessions
Operations on sessions in the Odudu admin API, one section each. Every request carries a bearer token; the index says which audience it needs and how a refusal is shaped.
GET /admin/tenants/{tenant}/sessions
Requires the "manage-sessions" capability.
Every live session in the tenant, whoever holds it, in id order; ?client= narrows it to the sessions holding a grant through that client (its row id).
Path parameters
| Name | Type | Required | Details |
|---|---|---|---|
tenant | string | yes | The tenant being administered, addressed by name. |
Query parameters
| Name | Type | Required | Details |
|---|---|---|---|
cursor | string | no | The next value of the previous page, to continue after it. |
limit | integer | no | How many items to return. A value over 200 is treated as 200; the default is 50. Constraints: at least 1. |
client | string | no | Only sessions that signed the user in to this client, by its internal id. Constraints: a UUID. |
Responses
200 OK
Body: application/json
| Field | Type | Required | Details |
|---|---|---|---|
items | array of object | yes | The entries of this answer. |
items[] | object | yes | |
items[].id | string | yes | The session’s identifier. |
items[].created_at | string | yes | When the user signed in. |
items[].last_active_at | string | yes | When the session last did anything. |
items[].remembered | boolean | yes | Whether the user chose to stay signed in, which gives the session the longer remember-me lifetimes. |
items[].client_ids | array of string | yes | The clients the session has signed the user in to. |
items[].subject_id | string | yes | The user the session belongs to. |
items[].username | string or null | yes | That user’s username, or null. |
next | string | no | An opaque cursor for the next page; absent on the last page. |
401 RFC 9457 problem details
Body: application/problem+json, an RFC 9457 problem document described under problem details.
403 RFC 9457 problem details
Body: application/problem+json, an RFC 9457 problem document described under problem details.
DELETE /admin/tenants/{tenant}/sessions
Requires the "manage-sessions" capability.
Ends the tenant’s live sessions, each as DELETE …/subjects/{id}/sessions/{sid} ends one, at most 500 a call in id order; remaining says how many are still live within reach, so a caller repeats the call until it is 0. A session whose subject holds an admin capability the caller does not is left alone and counted under beyond_ceiling (the target ceiling, run over the tenant).
Path parameters
| Name | Type | Required | Details |
|---|---|---|---|
tenant | string | yes | The tenant being administered, addressed by name. |
Responses
200 OK
Body: application/json
| Field | Type | Required | Details |
|---|---|---|---|
ended | integer | yes | How many sessions this call ended. Constraints: at least 0. |
remaining | integer | yes | How many are left; repeat the call until it is 0. Constraints: at least 0. |
beyond_ceiling | integer | yes | How many belong to users holding an admin capability the caller does not, which are left alone. Constraints: at least 0. |
401 RFC 9457 problem details
Body: application/problem+json, an RFC 9457 problem document described under problem details.
403 RFC 9457 problem details
Body: application/problem+json, an RFC 9457 problem document described under problem details.
GET /admin/tenants/{tenant}/sessions/count
Requires the "manage-sessions" capability.
Path parameters
| Name | Type | Required | Details |
|---|---|---|---|
tenant | string | yes | The tenant being administered, addressed by name. |
Query parameters
| Name | Type | Required | Details |
|---|---|---|---|
client | string | no | Only sessions that signed the user in to this client, by its internal id. Constraints: a UUID. |
Responses
200 OK
Body: application/json
| Field | Type | Required | Details |
|---|---|---|---|
count | integer | yes | How many items match, up to a cap. |
capped | boolean | yes | True when more match than count says, because counting stops at the cap. |
401 RFC 9457 problem details
Body: application/problem+json, an RFC 9457 problem document described under problem details.
403 RFC 9457 problem details
Body: application/problem+json, an RFC 9457 problem document described under problem details.
Documentation coverage: 18 of 18 fields described (100%).