Sessions management
Upon creation, you can manage sessions via session storage endpoints. You can find Session Storage API reference here.
Authorization headers
Before using this API ensure you obtained API Keys. Every endpoint expects these headers to be set:
ClientID
: The unique identifier of the client application.ClientSecret
: The secret key of the client application.
Get all active sessions
GET /session-storage/sessions
shows all active sessions of a user, ordered by creation datetime.
Query params:
- page_size — amount of items to show per page
- page_token — pagination token, obtained from
next
field of paginated response.
Example response:
{
"data": [
{
"id": "test-user.fec6b8fa.af4d2d22",
"created_at": "2024-10-11T09:02:56Z",
"updated_at": "2024-10-11T09:02:56Z",
"expires_at": "2024-11-10T09:02:56Z"
},
{
"id": "test-user.30d7f63e.9e77c70e",
"created_at": "2024-10-11T11:06:12Z",
"updated_at": "2024-10-11T11:06:12Z",
"expires_at": "2024-11-10T11:06:12Z"
}
]
"next_page_token": "eyJrZXkiOnsib ... c4NDlmIn0="
}
Get session by id
GET /session-storage/sessions/{session_id}
returns specific session info such as expiration datetime.
Path params:
- session_id — id of the session you want to query
Example response:
{
"data": {
"id": "58347ae0-8a5d-41cf-96d9-166b550b3335.b0327ccf.3c0742bc",
"created_at": "2024-10-21T14:13:18Z",
"updated_at": "2024-10-21T14:13:18Z",
"expires_at": "2024-11-20T14:13:18Z"
}
}
Delete session
DELETE /session-storage/sessions/{session_id}
deletes specific session. It is expected that you delete sessions that you do not use anymore, because number of sessions is limited per user.
Path params:
- session_id — id of the session you want to query
On success, empty 204 response is returned.
Update session expiration
POST /session-storage/sessions/{session_id}
updates specific session expiration time.
Path params:
- session_id — id of the session you want to query
Query params:
- ttl_seconds — new ttl, session will expire after now() + ttl_seconds.
On success, empty 204 response is returned.