Retrieve a local session
api/compliance/apps/sessions/local/retrieve
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/compliance/apps/sessions/local/retrieve Changed · +14 / -15 lines
# Retrieve a local session ## Path parameters ## Headers ## Returns ## Example ### Response (200) ## Retrieve a local session ### Path Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: Retrieve a local session -url: https://platform.claude.com/docs/en/api/compliance/apps/sessions/local/retrieve ---- +# Retrieve a local session -## Retrieve a local session +**GET** `/v1/compliance/apps/sessions/local/{local_session_id}` -**get** `/v1/compliance/apps/sessions/local/{local_session_id}` - Retrieve one local session. The response is the same session object the list endpoint returns,
enforced when the response is served: a session whose every inference call has aged out returns 404. -### Path Parameters +## Path parameters - `local_session_id: string` -### Header Parameters +## Headers - `"x-api-key": optional string` -### Returns +## Returns - `id: string`
Timestamp of the session's first retained inference call (RFC 3339, UTC). When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected, so this value is the timestamp of the earliest retained call: always strictly after the boundary, never the boundary itself. + format: date-time + - `organization_uuid: string` UUID of the child organization the session belongs to
- `type: "compliance_local_session"` - - `"compliance_local_session"` + default: compliance_local_session - `updated_at: string` Timestamp of the session's last retained inference call (RFC 3339, UTC). Always at or after `created_at`. When a session's activity spans the child organization's retention boundary, calls older than the boundary are no longer reflected — but because retention removes only the oldest calls, this value (unlike `created_at`) is unaffected until the entire session has aged out. On the list endpoint this value is a lower bound: for a session still active at a page or `created_at.lt` window boundary it can momentarily lag the session's true last activity. Retrieving the session, or its messages, always reflects the exact latest retained call. -- `user: object { id, email_address }` + format: date-time +- `user: object` + The authenticated user at the time of the session. Always set; `user.id` is always populated. `user.email_address` is null when the user's account has been deleted or the user is no longer a member of an organization the key may read. - `id: string`
Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace. -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/compliance/apps/sessions/local/$LOCAL_SESSION_ID \ -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY" ``` -#### Response +### Response (200) ```json {