ZITADEL Docs
APIsCore ResourcesV2Session

List sessions

Searches for sessions matching the given query. You can search by session ID, user ID, creation date, creator, user agent or expiration date.

Required permissions:

  • session.read
  • no permission required to search for own sessions
POST
/v2/sessions/search

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://loading/v2/sessions/search" \  -H "Content-Type: application/json" \  -d '{}'
{
  "details": {
    "totalResult": 0,
    "processedSequence": 0,
    "timestamp": "2023-01-15T01:30:15.01Z"
  },
  "sessions": [
    {
      "id": "string",
      "creationDate": "2023-01-15T01:30:15.01Z",
      "changeDate": "2023-01-15T01:30:15.01Z",
      "sequence": 0,
      "factors": {
        "user": {
          "verifiedAt": "2023-01-15T01:30:15.01Z",
          "id": "string",
          "loginName": "string",
          "displayName": "string",
          "organizationId": "string"
        },
        "password": {
          "verifiedAt": "2023-01-15T01:30:15.01Z"
        },
        "webAuthN": {
          "verifiedAt": "2023-01-15T01:30:15.01Z",
          "userVerified": true
        },
        "intent": {
          "verifiedAt": "2023-01-15T01:30:15.01Z"
        },
        "totp": {
          "verifiedAt": "2023-01-15T01:30:15.01Z"
        },
        "otpSms": {
          "verifiedAt": "2023-01-15T01:30:15.01Z"
        },
        "otpEmail": {
          "verifiedAt": "2023-01-15T01:30:15.01Z"
        },
        "recoveryCode": {
          "verifiedAt": "2023-01-15T01:30:15.01Z"
        }
      },
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "userAgent": {
        "fingerprintId": "string",
        "ip": "string",
        "description": "string",
        "header": {
          "property1": {
            "values": [
              "string"
            ]
          },
          "property2": {
            "values": [
              "string"
            ]
          }
        }
      },
      "expirationDate": "2023-01-15T01:30:15.01Z"
    }
  ]
}

Was this page helpful?