/\ ATFGraph /docs
README Downloads
HTTP API & schemas / ATFGraph
Framework reference

This article is retained from the existing framework docs. Self-hosting commands and server-admin access differ from the managed CLI workflow. Start with Get started for the installed product.

Approvals API

Save review requests, list waiting approvals and record an authorized decision.

Operations

OperationMethodPath
listApprovalsGET/api/v2/approvals
requestApprovalPOST/api/v2/approvals
getApprovalGET/api/v2/approvals/{id}
decideApprovalPOST/api/v2/approvals/{id}/decide

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

ParameterInRequiredType
limitquerynointeger
root_idquerynostring
statusquerynostring
traverser_idquerynostring

Responses

StatusBodyMeaning
200ApprovalListSuccessful operation
400ErrorResponseStructured API error
401ErrorResponseMissing or invalid credentials
403ErrorResponseRole or ownership denied
404ErrorResponseResource unavailable to this identity
409ErrorResponseRevision, idempotency, immutable version or lease conflict
413ErrorResponseStructured API error
422ErrorResponseCapability input/output schema violation
429ErrorResponseCapacity exceeded
500ErrorResponseStructured API error
503ErrorResponseStructured API error

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

StatusBodyMeaning
201ApprovalSuccessful operation
400ErrorResponseStructured API error
401ErrorResponseMissing or invalid credentials
403ErrorResponseRole or ownership denied
404ErrorResponseResource unavailable to this identity
409ErrorResponseRevision, idempotency, immutable version or lease conflict
413ErrorResponseStructured API error
422ErrorResponseCapability input/output schema violation
429ErrorResponseCapacity exceeded
500ErrorResponseStructured API error
503ErrorResponseStructured API error

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

ParameterInRequiredType
idpathyesstring
lease_tokenquerynostring
step_idquerynostring
task_idquerynostring

Responses

StatusBodyMeaning
200ApprovalSuccessful operation
400ErrorResponseStructured API error
401ErrorResponseMissing or invalid credentials
403ErrorResponseRole or ownership denied
404ErrorResponseResource unavailable to this identity
409ErrorResponseRevision, idempotency, immutable version or lease conflict
413ErrorResponseStructured API error
422ErrorResponseCapability input/output schema violation
429ErrorResponseCapacity exceeded
500ErrorResponseStructured API error
503ErrorResponseStructured API error

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

ParameterInRequiredType
idpathyesstring

Request body

ApprovalDecision (required)

{
  "decision": "string"
}

Responses

StatusBodyMeaning
200ApprovalSuccessful operation
400ErrorResponseStructured API error
401ErrorResponseMissing or invalid credentials
403ErrorResponseRole or ownership denied
404ErrorResponseResource unavailable to this identity
409ErrorResponseRevision, idempotency, immutable version or lease conflict
413ErrorResponseStructured API error
422ErrorResponseCapability input/output schema violation
429ErrorResponseCapacity exceeded
500ErrorResponseStructured API error
503ErrorResponseStructured API error

Example response 200

{
  "checkpoint": {},
  "decided_by": "string",
  "expires_at": 0,
  "id": "string",
  "operation_key": "string",
  "paused": false,
  "prompt": {},
  "response": {},
  "status": "string",
  "traverser_id": "string"
}
ATFGraph documentationHosted workflow · Framework reference