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
  • Auth
    none required

Request body

RequestDurableApprovalRequest required
execution_ref, string required

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

callback_id, string required

Opaque approval reference, supplied by the SDK.

name, string required
title, string required
description, string
details, unknown

Response

The approval was already registered

DurableApprovalRegistration required

The registered approval, as the requesting workflow sees it.

id, string 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_at, string date-time nullable required

Changes