Workflows

Execute workflow and wait for the result

Start an execution of the workflow and wait for it to finish, up to timeoutSeconds. Returns 200 with the result once the execution completes, fails or is cancelled. Returns 202 when it has not finished in time, or when it is paused or awaiting confirmation. The execution keeps running; follow it with GET /executions/{executionId}. This call is not idempotent: on a gateway timeout, look the execution up instead of retrying.

post/agents/v2/workflows/{workflowId}/execute/sync

Request

  • Base URL
    https://odyssey.asteroid.ai
  • URL
    https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/execute/sync
  • Auth
    API key in header X-Api-Key

Path parameters

workflowIdstring uuid required

Request body

agentProfileIdstring uuid
agentProfilePoolIdstring uuid
dynamicDataobject

Deprecated: Use 'inputs' instead. Inputs to be merged into the placeholders defined in prompts

headboolean

Run the editable head instead of the published version. Cannot be combined with version.

inputsobject

Inputs to be merged into the placeholders defined in prompts

metadataobject

Optional metadata key-value pairs (string keys and string values) for organizing and filtering executions

onCapacityLimit'reject' | 'queue'

Behaviour when the organisation or profile pool has no capacity for the execution

profileGroupIdstring uuid
profileIdstring uuid
timeoutSecondsinteger

Seconds to wait for the execution to finish before returning 202. Defaults to 25.

versioninteger

The version of the workflow to execute. If neither version nor head is provided, the published version is used.

Response

The request has succeeded.

executionIdstring uuid required
returnReason'ended' | 'needs_person' | 'status_change' | 'timed_out' required

Why a wait call returned. ended: the execution completed, failed or was cancelled. needs_person: it is paused, paused_by_agent or awaiting_confirmation and will not continue without a person. status_change: its status changed from the one it had when the call began. timed_out: the call stopped waiting before anything changed, normally because timeoutSeconds passed.

status'queued' | 'starting' | 'running' | 'paused' | 'awaiting_confirmation' | 'completed' | 'cancelled' | 'failed' | 'paused_by_agent' required

Changes

No recorded changes to this operation across all 1 revision of this API.