Skip to main content
GET
https://api.u1.archetypeai.app/v0.5
/
lens
/
sessions
/
metadata
curl https://api.dev.u1.archetypeai.app/v0.5/lens/sessions/metadata \
  -H "Authorization: Bearer $ATAI_API_KEY"
[
  {
    "session_id": "lsn-250313c2177253cbaa7a73542edd90",
    "lens_id": "lns-fd669361822b07e2-237ab3ffd79199b1",
    "last_update_timestamp": 1741843135.1848276,
    "session_status": "SESSION_STATUS_RUNNING",
    "session_endpoint": "wss://api.dev.u1.archetypeai.app/v0.5/lens/sessions/lsn-250313c2177253cbaa7a73542edd90",
    "session_duration_sec": 2811.020206451416
  }
]

Overview

This endpoint returns detailed information about each active lens session in your organization.

Request

Authorization
string
required
Bearer token for authentication. Format: Bearer $ATAI_API_KEY
session_id
string
Optional. Filter to a specific session by ID.
shard_index
integer
default:"-1"
Optional. Shard index for pagination. Use -1 to retrieve all sessions.
max_items_per_shard
integer
default:"-1"
Optional. Maximum items per shard. Use -1 for no limit.

Response

Returns an array of session objects, each containing:
session_id
string
Unique identifier for the session
lens_id
string
The lens ID associated with this session
last_update_timestamp
float
Unix timestamp of the last activity on this session
session_status
string
Current status of the session
session_endpoint
string
WebSocket endpoint for this session
session_duration_sec
float
How long the session has been active in seconds
curl https://api.dev.u1.archetypeai.app/v0.5/lens/sessions/metadata \
  -H "Authorization: Bearer $ATAI_API_KEY"
[
  {
    "session_id": "lsn-250313c2177253cbaa7a73542edd90",
    "lens_id": "lns-fd669361822b07e2-237ab3ffd79199b1",
    "last_update_timestamp": 1741843135.1848276,
    "session_status": "SESSION_STATUS_RUNNING",
    "session_endpoint": "wss://api.dev.u1.archetypeai.app/v0.5/lens/sessions/lsn-250313c2177253cbaa7a73542edd90",
    "session_duration_sec": 2811.020206451416
  }
]