Read a capture window with its reason
GET /v1/agents/{agent_id}/capture-windows/{capture_window_id}
| Property | Value |
|---|---|
| Operation | get_capture_window |
| Group | Capture windows and reveal grants |
| Scope | agents:write |
| Route class | read |
| Idempotency | No Idempotency-Key |
| Audit | An audited content read capture_window.read |
| Released in | 1.57.0 |
| Phase 0 host | Served (the hosted api pins 1.65.0) |
One capture window of the Agent with its reason, an audited content read (1.57.0); the reason is null once scrubbed.
Request
Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the agents:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.
curl "$VOCAL_API/v1/agents/agt_.../capture-windows/cpw_..." \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/agents/agt_.../capture-windows/cpw_...`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/agents/agt_.../capture-windows/cpw_...",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
agent_id | path | AgentId | yes | The id of an Agent: agt_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
capture_window_id | path | CaptureWindowId | yes | The id of a verbose capture window on an Agent: cpw_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log. |
Responses
| Status | Content type | Shape | Error codes |
|---|---|---|---|
200 | application/json | CaptureWindow | |
400 | application/json | ErrorEnvelope | invalid_request |
401 | application/json | ErrorEnvelope | unauthenticated |
403 | application/json | ErrorEnvelope | forbidden |
404 | application/json | ErrorEnvelope | not_found |
429 | application/json | ErrorEnvelope | rate_limited |
500 | application/json | ErrorEnvelope | internal_error |
Fields of the 200 answer
The shape is CaptureWindow.
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | AgentId | yes | |
agent_version | integer or null | yes | The one version the window captures; null for every version. |
calls_captured | integer | yes | The Calls the window made verbose so far. |
closed_at | Timestamp or null | yes | When a Member closed the window early. |
closed_by | ActorRef or null | yes | |
created_at | Timestamp | yes | |
created_by | ActorRef | yes | |
ends_at | Timestamp | yes | starts_at plus the duration; at most 24 hours later. |
environment | Environment | yes | |
id | CaptureWindowId | yes | |
max_calls | integer | yes | |
object | "capture_window" | yes | |
reason | string or null | no | Why the window is opened, for the access review: free text, stored as a content pair and scrubbed at retention_days. Answered only by GET /v1/agents/{agent_id}/capture-windows/{capture_window_id}, an audited content read; null once scrubbed. |
starts_at | Timestamp | yes | |
status | CaptureWindowStatus | yes |