Overview
The Flow Runs API allows you to trigger flow executions, retrieve run details, monitor execution status, and manage running flows. Flow runs represent individual executions of your automation flows.Base Endpoint
List Flow Runs
Retrieve a paginated list of flow runs with optional filters.Query Parameters
Filter runs by project ID
Filter runs by specific flow ID
Filter by run status. Multiple values allowed.Values:
RUNNING, SUCCEEDED, FAILED, PAUSED, QUOTA_EXCEEDED, INTERNAL_ERROR, TIMEOUT, STOPPEDFilter runs by tags
Filter runs that failed at a specific step
ISO 8601 timestamp - Filter runs created after this time
ISO 8601 timestamp - Filter runs created before this time
Filter by specific run IDs
Include archived runs in the results
Number of runs to return (1-100)
Pagination cursor from previous response
Response
Array of flow run objects (without step details for list view)
Cursor for next page (null if no more results)
Cursor for previous page (null if on first page)
Response Example
Get Flow Run
Retrieve detailed information about a specific flow run, including step execution data.Path Parameters
The flow run ID
Response
Returns the complete flow run object including step-by-step execution data.Dictionary of step execution results, keyed by step name. Contains input data, output data, duration, and status for each executed step.
Step data may be missing if:
- The run has not started yet
- The run is older than
AP_EXECUTION_DATA_RETENTION_DAYSand data has been purged
ID of the file containing execution logs
Response Example
Retry Flow Run
Retry a failed or stopped flow run.Path Parameters
The flow run ID to retry
Request Body
Retry strategy to use:
FROM_FAILED_STEP- Resume from the failed step, preserving previous step outputsON_LATEST_VERSION- Restart the entire flow using the latest published version
Project ID (for authorization)
Response
Returns the new flow run object created by the retry operation.Retry Strategies Explained:
- FROM_FAILED_STEP: Efficient for transient failures. Reuses successful step outputs and only re-executes from the point of failure.
- ON_LATEST_VERSION: Useful when you’ve fixed the flow definition. Starts fresh with the latest flow version.
Bulk Cancel Flow Runs
Cancel multiple paused or queued flow runs at once.Request Body
Specific run IDs to cancel. If provided, other filters are ignored.
Run IDs to exclude from cancellation
Cancel all runs for a specific flow
Cancel runs with specific statuses:
PAUSED, RUNNINGCancel runs created after this timestamp
Cancel runs created before this timestamp
Response
Bulk Retry Flow Runs
Retry multiple failed flow runs at once.Request Body
Retry strategy:
FROM_FAILED_STEP or ON_LATEST_VERSIONSpecific run IDs to retry
Run IDs to exclude from retry
Retry all runs for a specific flow
Retry runs with specific statuses
Retry runs that failed at a specific step
Retry runs created after this timestamp
Retry runs created before this timestamp
Response
Bulk Archive Flow Runs
Archive multiple flow runs to clean up your run history.Request Body
Accepts the same filters as bulk retry (exceptstrategy).
Specific run IDs to archive
Run IDs to exclude from archiving
Archive runs for a specific flow
Archive runs with specific statuses
Archive runs that failed at a specific step
Archive runs created after this timestamp
Archive runs created before this timestamp
Response
Archived runs are not deleted but are excluded from default list queries unless
includeArchived=true is specified.Resume Paused Run (Human Input)
Resume a paused flow run that’s waiting for human input.Path Parameters
The flow run ID
The request ID for the human input step
Request Body
The body should contain the response data expected by the human input step.Response
Returns the step’s response after processing the input. For synchronous requests (/sync endpoint), returns the output immediately.
Flow Run Status
Status Types
| Status | Description |
|---|---|
RUNNING | Flow is currently executing |
SUCCEEDED | Flow completed successfully |
FAILED | Flow failed during execution |
PAUSED | Flow is waiting for human input or approval |
QUOTA_EXCEEDED | Flow stopped due to quota limits |
INTERNAL_ERROR | Internal system error occurred |
TIMEOUT | Flow exceeded maximum execution time |
STOPPED | Flow was manually stopped |
Run Environments
PRODUCTION- Live executions triggered by real eventsTESTING- Test runs triggered from the flow builder
Nested Flow Runs
Flows can trigger other flows, creating parent-child relationships.Headers for Nested Runs
| Header | Description |
|---|---|
ap-parent-run-id | ID of the parent flow run |
ap-fail-parent-on-failure | If true, parent run fails when child fails |
Data Retention
Error Responses
Run Not Found (404)
Best Practices
Monitoring Runs
Monitoring Runs
- Use tags to categorize and filter runs
- Set up alerts for failed runs
- Regularly review
failedStepNameto identify problematic steps - Monitor
stepsCountand execution duration for performance
Retry Strategy
Retry Strategy
- Use
FROM_FAILED_STEPfor transient failures (network issues, rate limits) - Use
ON_LATEST_VERSIONafter fixing flow logic - Implement exponential backoff for bulk retries
- Consider max retry limits to avoid infinite loops
Data Management
Data Management
- Archive old successful runs to improve query performance
- Use date filters to query recent runs
- Export important run data before retention period expires
- Use pagination cursors for large result sets
Performance
Performance
- Filter by
flowIdto reduce result set size - Use
includeArchived=false(default) for faster queries - Avoid retrieving step data unless necessary
- Cache run statuses when polling
Code Examples
Related Endpoints
Flows API
Manage the flows that create these runs
Connections API
Manage connections used during execution