Skip to main content

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​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.

Query parameters​

NameTypeRequiredDetails
cursorstringnoThe next value of the previous page, to continue after it.
limitintegernoHow many items to return. A value over 200 is treated as 200; the default is 50. Constraints: at least 1.
clientstringnoOnly sessions that signed the user in to this client, by its internal id. Constraints: a UUID.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
itemsarray of objectyesThe entries of this answer.
items[]objectyes
items[].idstringyesThe session’s identifier.
items[].created_atstringyesWhen the user signed in.
items[].last_active_atstringyesWhen the session last did anything.
items[].rememberedbooleanyesWhether the user chose to stay signed in, which gives the session the longer remember-me lifetimes.
items[].client_idsarray of stringyesThe clients the session has signed the user in to.
items[].subject_idstringyesThe user the session belongs to.
items[].usernamestring or nullyesThat user’s username, or null.
nextstringnoAn 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​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
endedintegeryesHow many sessions this call ended. Constraints: at least 0.
remainingintegeryesHow many are left; repeat the call until it is 0. Constraints: at least 0.
beyond_ceilingintegeryesHow 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​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.

Query parameters​

NameTypeRequiredDetails
clientstringnoOnly sessions that signed the user in to this client, by its internal id. Constraints: a UUID.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
countintegeryesHow many items match, up to a cap.
cappedbooleanyesTrue 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%).