GET /analytics/org/{org_id}/flows/{flow_id}
List flow run logs matching the given filters.
How to use
Use this for existing legacy exports. Read the response as a list. page starts at 0; dates should include a timezone. state uses uppercase legacy states and may contain comma-separated values. Use a personal key or legacy private organization key, not the legacy public key.
Authentication and permissions
Authentication: personal API key or supported legacy private organization key in the Bearer header. This legacy route does not declare a separate endpoint permission scope in the checked contract.
Personal API key or the endpoint-specific legacy organization API key. Legacy inference uses the public organization key; legacy analytics uses the private organization key. This is not a password-grant login flow.
025Comma-separated list of statuses to filter by. Accepted values: PENDING, RUNNING, PAUSED, RESUMED, COMPLETED, FAILED, CANCELLED
Successful Response
Summary of a single workflow run.
Enum representing the possible states of a workflow.
How the run was initiated.
Who authenticated the run.
Principal the run is attributed to: profiles.id for user and personal_api_key (the key owner), organizations.org_id for org_api_key, end_users.id for end_user. NULL for system runs and legacy rows.
Display name of the principal: the profile email for user and personal_api_key runs, the organization name for org_api_key runs.
Project version that executed the run. Non-positive values mean the draft.
For draft runs, the project's published version at run time. Lets the UI label a draft against the version it was based on (e.g. 'Draft (v3)').
Stage the run executed against (draft/development/staging/production). Lets the UI tell a preview run (draft) from a deployed run for form and batch runs, which otherwise share the same project_version_id sentinel.
Run ID of the parent workflow for sub-workflow runs.
Project ID of the parent workflow for sub-workflow runs.
Name of the parent project for sub-workflow runs.
Validation Error
curl --fail-with-body -sS \
"$STACKAI_BASE_URL/analytics/org/${ORG_ID}/flows/${FLOW_ID}" \
-H "Authorization: Bearer $STACKAI_API_KEY"[
{
"run_id": "123e4567-e89b-12d3-a456-426614174000",
"conversation_id": "text",
"date": "2026-01-01T00:00:00.000Z",
"is_flow_successful": true,
"state": "PENDING",
"error": "text",
"latency": 1,
"total_tokens": 1,
"user_id": "text",
"inputs": "text",
"outputs": "text",
"llms": "text",
"feedback": "text",
"cache_metrics": {
"read_input_tokens": 1,
"observed_input_tokens": 0,
"known_input_tokens": 0,
"missing_input_usage_records": 0,
"cached_input_percent": 1,
"input_coverage_percent": 1
},
"llm_usage": [
{
"cache_metrics": {
"read_input_tokens": 1,
"observed_input_tokens": 0,
"known_input_tokens": 0,
"missing_input_usage_records": 0,
"cached_input_percent": 1,
"input_coverage_percent": 1
},
"provider": "Anthropic",
"model_id": "text",
"tokens": 1,
"input_tokens": 1,
"output_tokens": 1,
"cache_creation_input_tokens": 1,
"cache_read_input_tokens": 1,
"cache_measurement": {
"version": 1,
"read_input_tokens": 1,
"observed_input_tokens": 1
},
"connection_id": "123e4567-e89b-12d3-a456-426614174000",
"connection_origin": "stack_ai",
"is_local_model": true,
"should_charge": true
}
],
"run_type": "workflow_builder",
"ran_by_type": "user",
"ran_by_id": "text",
"ran_by_display_name": "text",
"project_version_id": 1,
"base_version_id": 1,
"deployment_stage": "draft",
"parent_run_id": "123e4567-e89b-12d3-a456-426614174000",
"parent_project_id": "text",
"parent_project_name": "text"
}
]Last updated
Was this helpful?

