SPB Git

Repository Public

retrieve.md 4.3 KB 102 lines markdown

1---2title: Retrieve a local session3url: https://platform.claude.com/docs/en/api/compliance/apps/sessions/local/retrieve4---56# Retrieve a local session78**GET** `/v1/compliance/apps/sessions/local/{local_session_id}`910Retrieve one local session.1112The response is the same session object the list endpoint returns,13with `user.email_address` resolved the same way. Retention is14enforced when the response is served: a session whose every15inference call has aged out returns 404.1617## Path parameters1819- `local_session_id: string`2021## Headers2223- `"x-api-key": optional string`2425## Returns2627- `type: "compliance_local_session"`2829  default: compliance_local_session3031- `id: string`3233  Local session identifier, prefixed `clls_`. Unique within the parent organization. Treat as an opaque string; the format may change without notice.3435- `created_at: string`3637  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.3839  format: date-time4041- `organization_uuid: string`4243  UUID of the child organization the session belongs to4445- `product_surface: string or null`4647  The product the session ran in: `cowork` (Cowork in Claude Desktop on the user's machine), `claude_code` (Claude Code), `claude_science` (Claude Science), or one of `office_agents/excel`, `office_agents/powerpoint`, `office_agents/word`, and `office_agents/outlook` (Claude for Microsoft 365, by app; `office_agents` alone when the app is not identified). New values appear as coverage expands; treat unrecognized values as opaque. `null` when the surface was not recorded.4849- `truncated: boolean`5051  True when the session has more inference calls than the service can return for one session (100,000). The messages endpoint then returns only the session's earliest calls, up to that many, and ends before the session does; `updated_at` is a lower bound on the latest call and can differ between the list and retrieve endpoints. False for every session within that bound.5253  default: false5455- `updated_at: string`5657  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.5859  format: date-time6061- `user: object`6263  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.6465  - `id: string`6667    User identifier (tagged ID, prefixed `user_`). Always set, so attribution survives after the user's account is deleted or the user leaves the organizations the key may read.6869  - `email_address: string or null`7071    User's email address. Null when the user's account has been deleted or the user is no longer a member of an organization the key may read. The messages endpoint does not resolve email addresses; this field is always null there.7273- `workspace_id: string or null`7475  Workspace identifier (tagged ID, prefixed `wrkspc_`). Null for sessions not attributed to a workspace.7677## Example7879```bash80curl https://api.anthropic.com/v1/compliance/apps/sessions/local/$LOCAL_SESSION_ID \81    -H 'anthropic-version: 2023-06-01' \82    -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"83```8485### Response (200)8687```json88{89  "type": "compliance_local_session",90  "id": "clls_eyJ2IjoxLCJvIjoiOWEx…",91  "organization_uuid": "9a1e0000-0000-0000-0000-000000000000",92  "workspace_id": "wrkspc_01SvYKoWVRVHoEbwESNvzYdR",93  "user": {94    "id": "user_01GpKpLmNoPqRsTuVwXyZaBc",95    "email_address": "engineer@example.com"96  },97  "product_surface": "cowork",98  "created_at": "2026-07-09T14:02:11Z",99  "updated_at": "2026-07-09T15:47:33Z"100}101```102
Files main
Menu

Theme