ReferenceHTTP APIAdmin

Read a session outside its share, with a reason

POST
/v1/sessions/{id}/audit-read

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.

Authorization

cookieSession
cookie__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.

Path Parameters

id*string

The 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)$
Formatuuid

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Request Body

application/json
  1. body
justification*string
Length1 <= length <= 1000
cursor?string
Length1 <= length
limit?integer
Range1 <= value <= 100
Default50

Response Body

Success

application/json
  1. response
session*
turns*
Example Request
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"  }}