List All Sessions
GET/iam/sessions
Listing all sessions that exist.
Request
Query Parameters
Possible values: >= 1 and <= 1000
Items per Page
This is the number of items per page to return.
250Next Page Token
The next page token.
Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. If no value is provided, the expandable properties are skipped.
Responses
- 200
- 400
- default
Session List Response
The response given when listing sessions in an administrative context.
- application/json
- Schema
- Example (auto)
Schema
- Array [
- ]
Active state. If false the session is no longer active.
The Session Authentication Timestamp
When this session was authenticated at. If multi-factor authentication was used this is the time when the last factor was authenticated (e.g. the TOTP code challenge was completed).
authentication_methods object[]
The authenticator assurance level can be one of "aal1", "aal2", or "aal3". A higher number means that it is harder for an attacker to compromise the account.
Generally, "aal1" implies that one authentication factor was used while AAL2 implies that two factors (e.g. password + TOTP) have been used.
Possible values: [aal0, aal1, aal2, aal3]
devices object[]
The Session Expiry
When this session expires at.
Session ID
identity object
The Session Issuance Timestamp
When this session was issued at. Usually equal or close to authenticated_at.
Tokenized is the tokenized (e.g. JWT) version of the session.
It is only set when the tokenize query parameter was set to a valid tokenize template during calls to /session/whoami.
[
{
"active": true,
"authenticated_at": "2024-07-29T15:51:28.071Z",
"authentication_methods": [
{
"aal": "aal0",
"completed_at": "2024-07-29T15:51:28.071Z",
"method": "link_recovery",
"organization": "string",
"provider": "string"
}
],
"authenticator_assurance_level": "aal0",
"devices": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"ip_address": "string",
"location": "string",
"user_agent": "string"
}
],
"expires_at": "2024-07-29T15:51:28.071Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"identity": {
"created_at": "2024-07-29T15:51:28.071Z",
"credentials": {},
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organization_id": "string",
"recovery_addresses": [
{
"created_at": "2024-07-29T15:51:28.071Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"updated_at": "2024-07-29T15:51:28.071Z",
"value": "string",
"via": "string"
}
],
"schema_id": "string",
"schema_url": "string",
"state": "active",
"state_changed_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z",
"verifiable_addresses": [
{
"created_at": "2014-01-01T23:28:56.782Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"updated_at": "2014-01-01T23:28:56.782Z",
"value": "string",
"verified": true,
"verified_at": "2024-07-29T15:51:28.071Z",
"via": "email"
}
]
},
"issued_at": "2024-07-29T15:51:28.071Z",
"tokenized": "string"
}
]
errorGeneric
- application/json
- Schema
- Example (auto)
Schema
error objectrequired
{
"error": {
"code": 404,
"debug": "SQL field \"foo\" is not a bool.",
"details": {},
"id": "string",
"message": "The resource could not be found",
"reason": "User with ID 1234 does not exist.",
"request": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"status": "Not Found"
}
}
errorGeneric
- application/json
- Schema
- Example (auto)
Schema
error objectrequired
{
"error": {
"code": 404,
"debug": "SQL field \"foo\" is not a bool.",
"details": {},
"id": "string",
"message": "The resource could not be found",
"reason": "User with ID 1234 does not exist.",
"request": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"status": "Not Found"
}
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://connhex.com/iam/sessions");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());