Live Sessions

List and stream live application sessions.

Live session management routes use /api/v1/wss.

All routes require applicationId, sessions:read, and access to that application. The account plan must also allow live session overview.

Get application sessions

GET /api/v1/wss/get-application-sessions

Required scope: sessions:read

curl "https://api.blazeauth.net/api/v1/wss/get-application-sessions?applicationId=123456789&page=1&pageSize=10" \
  -H "Authorization: Bearer $BLAZEAUTH_MANAGEMENT_API_KEY"
Query fieldTypeRequiredNotes
applicationIdstringYesTarget application id.
pagenumberNoPositive integer. Defaults to 1.
pageSizenumberNo1-50. Defaults to 10.
searchStringstringNoDefaults to an empty string.
categoriesstring or string[]Nolicense, ip, or clientId. Defaults to license. Repeat the query parameter for multiple values.
{
  "success": true,
  "message": "OK",
  "total": 3,
  "filteredTotal": 1,
  "authorizedSessionCount": 12,
  "lastConnectionTime": 1778586000000,
  "items": [
    {
      "serverId": "srv-01:session-abc",
      "ipAddress": "203.0.113.10",
      "createdAt": 1778585700000,
      "clientId": "client-001",
      "login": "john@example.com",
      "license": "ABCDEF-123456"
    }
  ],
  "page": 1,
  "pageSize": 10
}

createdAt and lastConnectionTime are numeric timestamps from the session service.

WebSocket stream

Connect to the same route over WebSocket to receive the initial page plus live deltas.

Required scope: sessions:read

wscat \
  -H "Authorization: Bearer $BLAZEAUTH_MANAGEMENT_API_KEY" \
  -c "wss://api.blazeauth.net/api/v1/wss/get-application-sessions?applicationId=123456789&page=1&pageSize=10"

Initial server message:

{
  "type": "init",
  "success": true,
  "total": 3,
  "filteredTotal": 1,
  "authorizedSessionCount": 12,
  "lastConnectionTime": 1778586000000,
  "items": [
    {
      "serverId": "srv-01:session-abc",
      "ipAddress": "203.0.113.10",
      "createdAt": 1778585700000,
      "clientId": "client-001",
      "login": "john@example.com",
      "license": "ABCDEF-123456"
    }
  ],
  "page": 1,
  "pageSize": 10
}

Server delta messages:

{
  "type": "added",
  "row": {
    "serverId": "srv-01:session-def",
    "ipAddress": "203.0.113.11",
    "createdAt": 1778586100000,
    "clientId": "client-002",
    "login": "alice@example.com",
    "license": "ZYXWVU-654321"
  }
}
{
  "type": "updated",
  "row": {
    "serverId": "srv-01:session-def",
    "ipAddress": "203.0.113.11",
    "createdAt": 1778586100000,
    "clientId": "client-002",
    "login": "alice@example.com",
    "license": "ZYXWVU-654321"
  }
}
{
  "type": "removed",
  "serverId": "srv-01:session-def"
}
{
  "type": "last_connection_time",
  "value": 1778586200000
}

Disconnect session

Send a WebSocket message on an open live-session stream.

Required scope: sessions:disconnect

{
  "type": "disconnect_session",
  "serverId": "srv-01:session-def"
}

The server publishes a disconnect notification. It does not send a dedicated ack message for this command.

On this page