v1

latestSwagger 2.02026-07-1760185352.5 KB
identity

Get Session

This endpoint is useful for:

Getting a session object with all specified expandables that exist in an administrative context.

get/admin/sessions/{id}

Path parameters

idstring required

ID is the session's ID.

Query parameters

expandstring[]

ExpandOptions is a query parameter encoded list of all properties that must be expanded in the Session. Example - ?expand=Identity&expand=Devices If no value is provided, the expandable properties are skipped.

Response

session

activeboolean

Active state. If false the session is no longer active.

authenticated_atstring date-time

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).

authenticator_assurance_levelstring

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.

To learn more about these levels please head over to: https://www.ory.com/kratos/docs/concepts/credentials

expires_atstring date-time

The Session Expiry

When this session expires at.

idstring uuid required

Session ID

issued_atstring date-time

The Session Issuance Timestamp

When this session was issued at. Usually equal or close to authenticated_at.

tokenizedstring

Tokenized is the tokenized (e.g. JWT) version of the session.

It is only set when the tokenize_as query parameter was set to a valid tokenize template during calls to /session/whoami.

Example response

{
  "identity": {
    "verifiable_addresses": [
      {
        "created_at": "2014-01-01T23:28:56.782Z",
        "updated_at": "2014-01-01T23:28:56.782Z",
        "verified": true,
        "via": "email"
      }
    ]
  }
}