Skip to content

Approvals

List approvals and record decisions.

The inbox (pending, what the caller may decide) or the history of approvals, paged.

status=pending is the inbox: the live pending approvals the caller may decide, nearest expiry first, then by id. A page may be short with next set, since rows the caller may not decide are dropped after the read. Any other status, or all, is the history, newest first: every approval for sefra_viewer and above, otherwise those whose requirements name one of the caller’s roles. summary is empty unless the caller holds sefra_auditor or above or a role the approval names. Unknown or repeated parameters are 400.

Parameters

Name In Type Required Description
status query string No One of pending, approved, denied, expired, cancelled, all. Default: pending.
view query string No history with status=pending lists every pending approval in the history’s scope, newest first; inbox goes with status=pending only. One of inbox, history.
after query string No The next of the previous page. An inbox cursor that names no approval is 400.
limit query integer No Default: 50. Minimum: 1. Maximum: 200.

Responses

Status Description Body
200 A page. object
400 A problem. Problem (application/problem+json)
401 No valid token (with WWW-Authenticate). Problem (application/problem+json)
403 The principal is not human or lacks the role. Problem (application/problem+json)

Body of 200

Field Type Required Description
approvals array of ApprovalItem Yes
next string No The after of the next page; absent on the last.

One approval.

Readable by a person whose role it names and by sefra_viewer and above. A person whose role it names sees everything it may: the clear input only if that person could decide the approval, by role and distinct_from_requester, and otherwise the redacted audit copy. For anyone else, summary and rationale need sefra_auditor or above (else [] and null), and each step’s redacted input needs sefra_operator or sefra_admin (else null).

Parameters

Name In Type Required Description
id path string Yes

Responses

Status Description Body
200 The approval. ApprovalDetail
401 No valid token (with WWW-Authenticate). Problem (application/problem+json)
403 The principal is not human or lacks the role. Problem (application/problem+json)
404 A problem. Problem (application/problem+json)

Record a decision at evidence level token.

Any authenticated principal; the rules answer an agent with NOT_ELIGIBLE.

Parameters

Name In Type Required Description
id path string Yes

Request body

Content type application/json, schema object.

Field Type Required Description
comment string No
decision string Yes One of approve, deny.
execution_hash string Yes

Responses

Status Description Body
200 Recorded. object
400 A problem. Problem (application/problem+json)
401 No valid token (with WWW-Authenticate). Problem (application/problem+json)
403 A refusal with a code (APPROVAL_NOT_PENDING, HASH_MISMATCH, NOT_ELIGIBLE, INVALID_STATE, INVALID_OUTPUT). Problem (application/problem+json)
404 A problem. Problem (application/problem+json)
409 A refusal with a code (APPROVAL_NOT_PENDING, HASH_MISMATCH, NOT_ELIGIBLE, INVALID_STATE, INVALID_OUTPUT). Problem (application/problem+json)

Body of 200

Field Type Required Description
approval_id string Yes
execution_id string Yes
status string Yes