Get Run
Retrieve detailed information about a specific ActionFlows run via the REST API, including its status, timing, and results.
Get Run
Retrieve detailed information about a specific run.
Endpoint
GET /api/runs/{runId}Try it
Live requests run from your browser. Open the API Explorer to try every operation from one screen.
/api/runs/{runId}Get run
Requests go to the live API from your browser. The docs server never sees this key.
curl -X GET 'https://api.actionflows.ai/api/runs/{runId}' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Accept: application/json'Response
Send a request to see the response.
Authentication
Required. See API Reference for authentication details.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
runId | string | Yes | The unique identifier of the run (must start with run_) |
Response
Success Response (200 OK)
{
"success": true,
"data": {
"id": "run_123",
"status": "COMPLETED",
"payload": {
"organizationId": "org_123",
"actionFlowId": "flow_123",
"inputs": {
"node_abc_prompt": "Hello"
},
"triggerSource": "api"
},
"output": {
"success": true,
"result": {
"executedNodeCount": 3,
"runHistoryId": "runhist_123"
}
},
"error": {
"message": "Node failed"
},
"tags": ["production"],
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:05:00.000Z",
"startedAt": "2024-01-01T00:00:01.000Z",
"finishedAt": "2024-01-01T00:05:00.000Z",
"durationMs": 299000
}
}Error Responses
400 Bad Request
{
"success": false,
"error": "Invalid run ID"
}This occurs when the run ID doesn't start with run_.
401 Unauthorized
{
"success": false,
"error": "Unauthorized",
"message": "Authentication required"
}404 Not Found
{
"success": false,
"error": "Run not found"
}429 Too Many Requests
{
"error": "Too many requests"
}Example Requests
cURL
curl -X GET https://api.actionflows.ai/api/runs/run_123 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"JavaScript
const runId = 'run_123';
const response = await fetch(`https://api.actionflows.ai/api/runs/${runId}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const data = await response.json();
if (data.success) {
const run = data.data;
console.log('Run ID:', run.id);
console.log('Status:', run.status);
console.log('Duration:', run.durationMs, 'ms');
if (run.status === 'COMPLETED') {
console.log('Output:', run.output);
} else if (run.status === 'FAILED') {
console.error('Run failed');
}
} else {
console.error('Error:', data.error);
if (response.status === 404) {
console.error('Run not found');
}
}Python
import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
}
run_id = 'run_123'
response = requests.get(
f'https://api.actionflows.ai/api/runs/{run_id}',
headers=headers
)
data = response.json()
if data['success']:
run = data['data']
print(f"Run ID: {run['id']}")
print(f"Status: {run['status']}")
print(f"Duration: {run.get('durationMs', 'N/A')} ms")
if run['status'] == 'COMPLETED':
print(f"Output: {run.get('output', {})}")
elif run['status'] == 'FAILED':
print("Run failed")
else:
print(f"Error: {data['error']}")
if response.status_code == 404:
print("Run not found")Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique run identifier (starts with run_) |
status | string | Run status |
payload | object | Public run payload |
payload.organizationId | string | Organization ID |
payload.actionFlowId | string | Flow ID |
payload.inputs | object | Per-run input overrides |
payload.triggerSource | string | How the run was started (api, webhook, schedule, …) |
output | object | Run output (if present) |
error | object | { message } when the run failed |
tags | array | Caller tags (organization ownership tags are omitted) |
createdAt | string (ISO 8601) | Run creation timestamp |
updatedAt | string (ISO 8601) | Last update timestamp |
startedAt | string (ISO 8601) | Run start timestamp |
finishedAt | string (ISO 8601) | Run finish timestamp (if finished) |
durationMs | number | Run duration in milliseconds (if finished) |
metadata | object | Safe ActionFlow execution progress; internal runtime metadata is omitted |
metadata.activeNodeId | string | Node currently executing (if present) |
metadata.failedNodeId | string | Node that failed (if present) |
metadata.executedNodes | non-negative integer | Number of nodes executed so far |
metadata.totalNodes | non-negative integer | Total executable node count |
metadata.status | string | ActionFlow execution phase |
Run Status Values
COMPLETED- Run finished successfullyFAILED- Run failed with an errorCANCELED- Run was canceledCRASHED- Run crashed unexpectedlyTIMED_OUT- Run exceeded time limitWAITING- Run is waiting to startEXECUTING- Run is currently executingPAUSED- Run is paused
Notes
- Run IDs must start with
run_ - The
outputfield is only available for completed runs - The
durationMsfield is only available for completed runs - Internal runtime fields, including machine sizing, cost, task version, and unsanitized metadata, are not returned
- Use the Stream Run endpoint for real-time updates
- This endpoint is rate-limited per user
List Runs
List all ActionFlows runs across your flows via the REST API, with optional filtering and pagination. Includes request parameters and response schema.
Trigger Run
Start an ActionFlow execution with POST /api/runs, including the public payload envelope, options, response envelopes, validation timing, and status behavior.