Grant or deny a pending resource request
POST /admin/requests/{id}/decide
Atomic CAS — only pending requests transition. Re-deciding an already-decided request returns 409.
On grant, a user_capability_grants row is inserted in the same tx as the resource_request CAS. expires_at on the grant is the same value the operator supplied here; the CapabilitySweeper reaps both together when it fires.
Requires share.grant capability OR system.admin.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”object
Operator-supplied decision reason.
On grant: optional auto-expiry. Past values rejected. Omit / null for a permanent grant. Ignored on deny.
Responses
Section titled “ Responses ”Decided.
A resource_request row. The state machine is pending → granted / denied (admin decision); granted → expired (CapabilitySweeper cascade). Terminal states admit no further transitions.
object
On granted requests, the linked grant’s auto-expiry. Null means permanent.
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completedResource not found
object
Human-readable error summary
Example
the request could not be completedAlready decided.
object
Human-readable error summary
Example
the request could not be completed