Skip to content

Wait For Execution

POST
/api/v1/executions/{execution_id}/wait

Wait for execution to complete (LEGACY - CLI only).

WARNING: This endpoint blocks the HTTP connection until completion. NOT recommended for:

  • Frontend applications (use GET /events SSE instead)
  • Load-balanced environments
  • Long-running executions

Use cases where this is acceptable:

  • CLI tools with —wait flag
  • CI/CD scripts with timeout
  • Simple synchronous integrations

For reactive monitoring, use GET /executions/{id}/events instead.

Args: execution_id: Execution UUID to wait for request: Wait request with timeout waiter: Execution waiter (injected) service: Execution service for stats (injected)

Returns: Wait result with completion status and final statistics

Raises: HTTPException: 404 if execution not found, 503 if waiter unavailable

execution_id
required
Execution Id
string
ExecutionWaitRequest

Request to wait for execution completion.

object
timeout
Timeout

Maximum time to wait in seconds (1-3600)

number
default: 300 >= 1 <= 3600

Successful Response

ExecutionWaitResponse

Response from waiting for execution completion.

object
completed
required
Completed

Whether execution completed (vs timeout)

boolean
execution_id
required
Execution Id

Execution UUID

string format: uuid
duration_ms
required
Duration Ms

How long the wait took in milliseconds

number
message
Any of:
string
stats
Any of:
ExecutionStatsResponse

Execution statistics (derived from lineage).

object
execution_id
required
Execution Id

Execution UUID

string format: uuid
total_messages
Total Messages

Total messages processed

integer
0
completed_messages
Completed Messages

Successfully completed messages

integer
0
failed_messages
Failed Messages

Failed messages

integer
0
in_progress_messages
In Progress Messages

Messages still processing

integer
0
success_rate
Success Rate

Completion success rate

number
0

Resource not found

ErrorResponse

Standard error response matching FastAPI HTTPException format.

This model is used in OpenAPI response declarations for 4xx/5xx errors. The detail field matches FastAPI’s HTTPException structure.

object
detail
required
Detail

Error message (matches FastAPI HTTPException)

string
error_code
Any of:
string
correlation_id
Any of:
string
timestamp
Timestamp

Error timestamp

string format: date-time

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Execution waiter not available

ErrorResponse

Standard error response matching FastAPI HTTPException format.

This model is used in OpenAPI response declarations for 4xx/5xx errors. The detail field matches FastAPI’s HTTPException structure.

object
detail
required
Detail

Error message (matches FastAPI HTTPException)

string
error_code
Any of:
string
correlation_id
Any of:
string
timestamp
Timestamp

Error timestamp

string format: date-time