Durable Functions

Request an approval from inside a workflow

Changed on

Registers an approval request for a running durable execution. The Volcano SDK calls this from ctx.waitForApproval; applications do not call it directly.

execution_ref and callback_id are opaque values the SDK reads from the running workflow. Together they are the request's credential, so the operation takes no other authentication. The approval belongs to the project that owns the execution, and expires when the workflow's own approval timeout does.

Retrying is safe: a request for an approval that is already registered returns it with 200.

post/durable-approvals

Request

  • Base URL: https://api.volcano.dev
  • URL: https://api.volcano.dev/durable-approvals
  • Auth: none required

Request body

execution_refstring required

Opaque reference to the running execution, supplied by the SDK.

callback_idstring required

Opaque approval reference, supplied by the SDK.

namestring required
titlestring required
descriptionstring
detailsunknown

Response

The approval was already registered

idstring uuid required
status'pending' | 'approved' | 'denied' | 'expired' | 'cancelled' required

pending means the workflow is waiting for a decision. approved and denied are decisions a person made. expired means the workflow's approval timeout passed first, and cancelled means the execution ended while the approval was still pending. Every status but pending is final.

expires_atstring date-time nullable required

Changes