Execution

Wait for an execution's status to change

Wait up to timeoutSeconds for an execution's status to change. Returns 200 with the result once the execution completes, fails or is cancelled. Returns 202 as soon as its status differs from the one it had when the call began, at once when it is paused, paused_by_agent or awaiting_confirmation, and otherwise when timeoutSeconds passes. returnReason says which. On awaiting_confirmation, awaitingConfirmation names the node the execution holds at. Call it again to keep waiting.

get/agents/v2/executions/{executionId}/sync

Request

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

Path parameters

executionIdstring uuid required

Query parameters

timeoutSecondsinteger

Seconds to wait for a change before returning 202. Defaults to 25.

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.