sessions

Get persistent session

Get one active persistent session by its exact app_name, user_id, and session ID, with its most recent events. Session state omits keys in the reserved connic: namespace. Expired and internal sessions return 404.

Required permission: sessions.view.

get/v1/projects/{project_id}/sessions/{environment_id}/{session_id}

Request

  • Base URL
    https://api.connic.co
  • Auth
    HTTP bearer

Path parameters

project_id, string uuid required

ID of the project the API key belongs to.

environment_id, string uuid required

Environment ID from GET /environments.

session_id, string required

Session ID from GET /sessions/{environment_id}.

Query parameters

app_name, string required

The session's app_name from GET /sessions/{environment_id}.

user_id, string required

The session's user_id from GET /sessions/{environment_id}.

event_limit, integer

Maximum number of most recent events to return.

Response

Successful Response

PersistentSessionDetail required
id, string uuid required
session_id, string required

session-<agent name>-<key>, where the key is the value resolved from the agent's session.key, or default when no key is set.

app_name, string required

runner- followed by the agent name with hyphens replaced by underscores.

user_id, string required

User identity of the session. Pass it with app_name to get or delete this exact session.

state, object required

Session state saved by the agent's runs. Keys in the reserved connic: namespace are omitted.

event_count, integer required

Total events recorded in the session.

expires_at, string date-time nullable

Expiry time, extended each time a run uses the session; null when the agent sets no session.ttl.

last_update_time, string date-time required

Time a run last used or updated the session.

created_at, string date-time required
events, PersistentSessionEvent[] required

Most recent events in ascending event_index order, up to event_limit.

Changes

No recorded changes to this operation across all 17 revisions of this API.