ReferenceHTTP APIAdmin
Read a session outside its share, with a reason
POST
Owners and admins. The session detail and a page of its turns, whatever the share; nothing on the session changes and no other action is opened by it. Every read is recorded with its justification.
Auth: cookie session only; no scope. Idempotency-Key: ignored.
cookieSessioncookie
__Host-werft_session<token>For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.
id*stringThe session's id.
Match
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidX-Requested-With?"werft-web"Required with a cookie session: the literal werft-web.
Value in
"werft-web"application/json- body
justification*stringLength
1 <= length <= 1000cursor?stringLength
1 <= lengthlimit?integerRange
1 <= value <= 100Default
50Success
application/json- response
session*turns*curl -X POST 'https://example.com/v1/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/audit-read' \ -H 'Content-Type: application/json' \ -d '{ "justification": "string"}'Example Response
{ "session": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "title": null, "agent": null, "agent_hidden": false, "created_by": null, "channel": null, "slack_permalink": null, "revision": 0, "admission_state": "active", "status": "queued", "input_wait": { "state": "waiting", "since": "2019-08-24T14:15:22Z", "kinds": [ "permission" ], "request_ids": [ "string" ], "park_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z" }, "runtime": { "kind": "claude_agent_sdk", "version": "string", "profile_id": "string", "model": "string", "permission_mode": "default" }, "model": "string", "repository_id": "string", "repository": null, "attached_repository_ids": [ "string" ], "attached_repositories": [ { "id": "string", "full_name": "string" } ], "extensions": [ { "bundle_id": "fc6f5a67-caa1-4339-9c14-a67826143b60", "name": "string", "digest": "string", "scope": "profile" } ], "current_turn_id": "string", "queued_turn_count": 0, "last_event_at": "2019-08-24T14:15:22Z", "activity": { "last": { "kind": "text", "text": "string" }, "tool_count": 0, "error_count": 0, "subagent_count": 0, "current_tool": { "id": "string", "name": "string", "target": "string", "state": "running", "since": "2019-08-24T14:15:22Z", "request": { "kind": "permission", "prompt": "string" } }, "window": { "events": 0, "complete": true, "since": "2019-08-24T14:15:22Z" } }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "workspace_limit_mode": { "bytes": "hard", "inodes": "hard", "reason": "string" }, "execution": { "backend": "local_docker", "state": "pending", "observed_at": "2019-08-24T14:15:22Z" }, "checkpoint_revision": 0, "pause_reason": "awaiting_input", "pending_request_count": 0, "attention": { "code": "PAUSE_BLOCKED", "reason": "long_turn" }, "durability": { "last_transcript_persisted_at": "2019-08-24T14:15:22Z", "checkpoint_committed_at": "2019-08-24T14:15:22Z", "checkpoint_revision": 0, "last_completed_turn_id": "string", "last_checkpointed_turn_id": "string", "checkpoint_pending_reason": "string", "checkpoint_fallback_revision": 0, "context_reset_turn_id": "string" } }, "turns": { "items": [ { "turn_id": "string", "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82", "status": "queued", "message": "string", "channel": null, "created_by": null, "slack_permalink": null, "terminal_reason": "string", "checkpoint_revision": 0, "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "ended_at": "2019-08-24T14:15:22Z" } ], "next_cursor": "string" }}