Approvals API
Save review requests, list waiting approvals and record an authorized decision.
Operations
listApprovals
GET /api/v2/approvals
Requires: invoke role
Approvals of the caller's principal (every principal for an admin), newest first. Filters: traverser_id (one step), root_id (every step of one execution tree), status (pending, approved, rejected or expired; 400 invalid_input otherwise), limit (default and maximum 1000). Without filters this is the whole namespace, which grows with every gate a run raises; the Studio screens pass traverser_id.
Generated Python client internals: atfgraph._generated.api.approvals_api.ApprovalsApi.list_approvals()
Parameters
| Parameter | In | Required | Type |
|---|
limit | query | no | integer |
root_id | query | no | string |
status | query | no | string |
traverser_id | query | no | string |
Responses
Example response 200
{
"items": [
{
"checkpoint": {},
"decided_by": "string",
"expires_at": 0,
"id": "string",
"operation_key": "string",
"paused": false,
"prompt": {},
"response": {},
"status": "string",
"traverser_id": "string"
}
]
}
requestApproval
POST /api/v2/approvals
Requires: worker role
Generated Python client internals: atfgraph._generated.api.approvals_api.ApprovalsApi.request_approval()
Request body
ApprovalRequest (required)
{
"id": "string",
"lease_token": "string",
"operation_key": "string",
"prompt": {},
"worker_id": "string"
}
Responses
Example response 201
{
"checkpoint": {},
"decided_by": "string",
"expires_at": 0,
"id": "string",
"operation_key": "string",
"paused": false,
"prompt": {},
"response": {},
"status": "string",
"traverser_id": "string"
}
getApproval
GET /api/v2/approvals/{id}
Requires: invoke role, worker role
Generated Python client internals: atfgraph._generated.api.approvals_api.ApprovalsApi.get_approval()
Parameters
| Parameter | In | Required | Type |
|---|
id | path | yes | string |
lease_token | query | no | string |
step_id | query | no | string |
task_id | query | no | string |
Responses
Example response 200
{
"checkpoint": {},
"decided_by": "string",
"expires_at": 0,
"id": "string",
"operation_key": "string",
"paused": false,
"prompt": {},
"response": {},
"status": "string",
"traverser_id": "string"
}
decideApproval
POST /api/v2/approvals/{id}/decide
Requires: invoke role
Generated Python client internals: atfgraph._generated.api.approvals_api.ApprovalsApi.decide_approval()
Parameters
| Parameter | In | Required | Type |
|---|
id | path | yes | string |
Request body
ApprovalDecision (required)
{
"decision": "string"
}
Responses
Example response 200
{
"checkpoint": {},
"decided_by": "string",
"expires_at": 0,
"id": "string",
"operation_key": "string",
"paused": false,
"prompt": {},
"response": {},
"status": "string",
"traverser_id": "string"
}