Open source / Rust / MIT Field guide / indexed
Field guide / Approvals APIReviewable source / main

Approvals API

Cross-domain approval worklist: the pending-approvals queue and the approval decision-readiness contract.

2 routes

Response metadata: x-api-version, x-request-id, and traceresponse apply to normal routed responses and are omitted from the per-operation header tables below.

GET/api/approvals/decision-readiness-contract

request access

Approvals decision readiness.

Permissions

Access classCredentialScoping
requestAn authenticated session or API bearer token is required.The access class is enforced first; site and environment scopes narrow resources on scoped operations.

HTTP request

GET https://<your-host>/api/approvals/decision-readiness-contract

Path parameters

This operation has no path parameters.

Query parameters

This operation has no query parameters.

Request headers

NameTypeRequirementDescription
AuthorizationstringOptionalHuman credential alternative: supply one Bearer rys_... session token, ryk_... API token, or validated identity-provider JWT here. Do not combine it with X-Ryuki-Session-Id or the session cookie; conflicting carriers fail closed.
X-Ryuki-Session-IdstringOptionalOpaque rys_... session-token carrier used by the portal for mutations. Administrative session UUIDs cannot authenticate. Supply exactly one credential carrier per request.
traceparentstringOptionalOptional correlation input. When the second dash-separated segment has 32 characters, Ryuki reuses it as the request correlation identifier; this is not full W3C validation.

Request body

This operation does not accept a request body.

Response

StatusDescriptionBody
200OKValue

200 response body

Structure: Value.

NameTypeRequirementDescription
sourcestringRequiredOrigin or authority of the returned data.
approvalReadinessModestringRequiredValue of approvalReadinessMode returned in the response body.
identityProviderstringRequiredValue of identityProvider returned in the response body.
configuredForProductionbooleanRequiredValue of configuredForProduction returned in the response body.
decisionQueueReadOnlybooleanRequiredValue of decisionQueueReadOnly returned in the response body.
routeCatalogReadOnlybooleanRequiredValue of routeCatalogReadOnly returned in the response body.
evidenceRequiredbooleanRequiredValue of evidenceRequired returned in the response body.
localMockAuthAllowedbooleanRequiredValue of localMockAuthAllowed returned in the response body.
providerCallsAllowedbooleanRequiredValue of providerCallsAllowed returned in the response body.
liveAuthenticationAllowedbooleanRequiredValue of liveAuthenticationAllowed returned in the response body.
graphCallsAllowedbooleanRequiredValue of graphCallsAllowed returned in the response body.
entraGroupLookupAllowedbooleanRequiredValue of entraGroupLookupAllowed returned in the response body.
serviceNowApprovalMutationAllowedbooleanRequiredValue of serviceNowApprovalMutationAllowed returned in the response body.
approvalExecutionAllowedbooleanRequiredValue of approvalExecutionAllowed returned in the response body.
approvalQueueMutationAllowedbooleanRequiredValue of approvalQueueMutationAllowed returned in the response body.
approvalDecisionMutationAllowedbooleanRequiredValue of approvalDecisionMutationAllowed returned in the response body.
notificationDispatchAllowedbooleanRequiredValue of notificationDispatchAllowed returned in the response body.
workflowMutationAllowedbooleanRequiredValue of workflowMutationAllowed returned in the response body.
rawApproverDataAllowedbooleanRequiredValue of rawApproverDataAllowed returned in the response body.
rawApprovalPayloadsAllowedbooleanRequiredValue of rawApprovalPayloadsAllowed returned in the response body.
rawRequestPayloadsAllowedbooleanRequiredValue of rawRequestPayloadsAllowed returned in the response body.
rawRecipientDataAllowedbooleanRequiredValue of rawRecipientDataAllowed returned in the response body.
rawProviderPayloadsAllowedbooleanRequiredValue of rawProviderPayloadsAllowed returned in the response body.
rawLogContentAllowedbooleanRequiredValue of rawLogContentAllowed returned in the response body.
rawRowsAllowedbooleanRequiredValue of rawRowsAllowed returned in the response body.
tenantIdentifiersAllowedbooleanRequiredValue of tenantIdentifiersAllowed returned in the response body.
objectIdentifiersAllowedbooleanRequiredValue of objectIdentifiersAllowed returned in the response body.
principalIdentifiersAllowedbooleanRequiredValue of principalIdentifiersAllowed returned in the response body.
groupIdentifiersAllowedbooleanRequiredValue of groupIdentifiersAllowed returned in the response body.
serviceNowIdentifiersAllowedbooleanRequiredValue of serviceNowIdentifiersAllowed returned in the response body.
privateNetworkValuesAllowedbooleanRequiredValue of privateNetworkValuesAllowed returned in the response body.
credentialValuesAllowedbooleanRequiredValue of credentialValuesAllowed returned in the response body.
tokenValuesAllowedbooleanRequiredValue of tokenValuesAllowed returned in the response body.
approvalRoutesarray<JSON value>RequiredValue of approvalRoutes returned in the response body.
decisionStatesarray<JSON value>RequiredValue of decisionStates returned in the response body.
decisionTypesarray<JSON value>RequiredValue of decisionTypes returned in the response body.
routeStagesarray<JSON value>RequiredValue of routeStages returned in the response body.
approvalScopesarray<JSON value>RequiredValue of approvalScopes returned in the response body.
escalationStatesarray<JSON value>RequiredValue of escalationStates returned in the response body.
requiredGuardsarray<JSON value>RequiredValue of requiredGuards returned in the response body.
blockedReasonsarray<JSON value>RequiredValue of blockedReasons returned in the response body.
requiredEvidencearray<JSON value>RequiredValue of requiredEvidence returned in the response body.
rulesarray<JSON value>RequiredValue of rules returned in the response body.

Errors

JSON failures use one of the platform error envelopes and include the request correlation metadata when routing reaches the API middleware. See Errors for the exact shapes, authentication failures, retry guidance, and transport-level exceptions.

Examples

Request

curl --silent --show-error --globoff \
  --request GET \
  --header 'Authorization: Bearer <token>' \
  'https://<your-host>/api/approvals/decision-readiness-contract'

Schematic response body

Illustrative shape generated from the extracted field types, not a recorded live response. Values are placeholders; null marks a field whose type could not be resolved.

Success status: 200

{
  "source": "<string>",
  "approvalReadinessMode": "<string>",
  "identityProvider": "<string>",
  "configuredForProduction": false,
  "decisionQueueReadOnly": false,
  "routeCatalogReadOnly": false,
  "evidenceRequired": false,
  "localMockAuthAllowed": false,
  "providerCallsAllowed": false,
  "liveAuthenticationAllowed": false,
  "graphCallsAllowed": false,
  "entraGroupLookupAllowed": false,
  "serviceNowApprovalMutationAllowed": false,
  "approvalExecutionAllowed": false,
  "approvalQueueMutationAllowed": false,
  "approvalDecisionMutationAllowed": false,
  "notificationDispatchAllowed": false,
  "workflowMutationAllowed": false,
  "rawApproverDataAllowed": false,
  "rawApprovalPayloadsAllowed": false,
  "rawRequestPayloadsAllowed": false,
  "rawRecipientDataAllowed": false,
  "rawProviderPayloadsAllowed": false,
  "rawLogContentAllowed": false,
  "rawRowsAllowed": false,
  "tenantIdentifiersAllowed": false,
  "objectIdentifiersAllowed": false,
  "principalIdentifiersAllowed": false,
  "groupIdentifiersAllowed": false,
  "serviceNowIdentifiersAllowed": false,
  "privateNetworkValuesAllowed": false,
  "credentialValuesAllowed": false,
  "tokenValuesAllowed": false,
  "approvalRoutes": [],
  "decisionStates": [],
  "decisionTypes": [],
  "routeStages": [],
  "approvalScopes": [],
  "escalationStates": [],
  "requiredGuards": [],
  "blockedReasons": [],
  "requiredEvidence": [],
  "rules": []
}

GET/api/approvals/pending

approve access

Returns the list of requests pending approval by the calling approver.

A request is "pending my approval" iff ALL hold:

  1. status = 'planned' (the only approvable from-state), AND
  2. NO current-epoch decision exists for (request_id, role).

NOTE: The approval_route @> containment filter is intentionally NOT applied here. The request lifecycle does not populate approval_route with canonical role constants before the approval step: new requests start with approval_route = [] and the plan transition does not push any role into it. Filtering on approval_route would therefore return nothing for real data. Per-request approver-type routing is a documented follow-up (resolve the display-vs-canonical role-string mismatch and have the lifecycle push canonical roles into approval_route per required-approver-per-type if that model is adopted). Until then, an approver's inbox = all planned requests they have not yet decided.

The role constant $1 IS used in the NOT EXISTS sub-query — that sub-query is correct because the approve/reject handlers write request_approval_decisions rows keyed on the same approval_role_for canonical constant.

CRITICAL AUTHZ NOTE: this is a GET, so the central read middleware admits any "request"/"audit" role holder through (it treats all non-sensitive GETs as ordinary reads). The approve-only requirement MUST be enforced here in the handler — exactly mirroring requests_approve and requests_reject.

Permissions

Access classCredentialScoping
approveAn authenticated session or API bearer token is required.The access class is enforced first; site and environment scopes narrow resources on scoped operations.

HTTP request

GET https://<your-host>/api/approvals/pending

Path parameters

This operation has no path parameters.

Query parameters

This operation has no query parameters.

Request headers

NameTypeRequirementDescription
AuthorizationstringOptionalHuman credential alternative: supply one Bearer rys_... session token, ryk_... API token, or validated identity-provider JWT here. Do not combine it with X-Ryuki-Session-Id or the session cookie; conflicting carriers fail closed.
X-Ryuki-Session-IdstringOptionalOpaque rys_... session-token carrier used by the portal for mutations. Administrative session UUIDs cannot authenticate. Supply exactly one credential carrier per request.
traceparentstringOptionalOptional correlation input. When the second dash-separated segment has 32 characters, Ryuki reuses it as the request correlation identifier; this is not full W3C validation.

Request body

This operation does not accept a request body.

Response

StatusDescriptionBody
200OKValue

For 200, the known response body type is Value. Its field schema is unavailable, so no JSON shape is inferred.

Errors

JSON failures use one of the platform error envelopes and include the request correlation metadata when routing reaches the API middleware. See Errors for the exact shapes, authentication failures, retry guidance, and transport-level exceptions.

Examples

Request

curl --silent --show-error --globoff \
  --request GET \
  --header 'Authorization: Bearer <token>' \
  'https://<your-host>/api/approvals/pending'
Last updated 2026-07-16 · Generated from the API route registrations.