For the complete documentation index, see llms.txt. This page is also available as Markdown.

GET /analytics/org/{org_id}/flows/{flow_id}

List Flow Runs

get

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.

Authorizations
AuthorizationstringRequired

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.

Path parameters
flow_idstringRequired
org_idstringRequired
Query parameters
pageintegerOptionalDefault: 0
page_sizeinteger · min: 1OptionalDefault: 25
start_datestring · date-time · nullableOptional
end_datestring · date-time · nullableOptional
user_idstring · nullableOptional
statestring · nullableOptional

Comma-separated list of statuses to filter by. Accepted values: PENDING, RUNNING, PAUSED, RESUMED, COMPLETED, FAILED, CANCELLED

Responses
200

Successful Response

application/json

Summary of a single workflow run.

run_idstring · uuidRequired
conversation_idstring · nullableOptional
datestring · date-timeRequired
is_flow_successfulboolean · nullableRequired
statestring · enum · nullableRequired

Enum representing the possible states of a workflow.

Possible values:
errorstring · nullableRequired
latencynumber · nullableRequired
total_tokensintegerRequired
user_idstring · nullableRequired
inputsstring · nullableRequired
outputsstring · nullableRequired
llmsstring · nullableRequired
feedbackstring · nullableRequired
run_typestring · enum · nullableOptional

How the run was initiated.

Possible values:
ran_by_typestring · enum · nullableOptional

Who authenticated the run.

Possible values:
ran_by_idstring · nullableOptional

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.

ran_by_display_namestring · nullableOptional

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_idinteger · nullableOptional

Project version that executed the run. Non-positive values mean the draft.

base_version_idinteger · nullableOptional

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)').

deployment_stagestring · enum · nullableOptional

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.

Possible values:
parent_run_idstring · uuid · nullableOptional

Run ID of the parent workflow for sub-workflow runs.

parent_project_idstring · nullableOptional

Project ID of the parent workflow for sub-workflow runs.

parent_project_namestring · nullableOptional

Name of the parent project for sub-workflow runs.

get/analytics/org/{org_id}/flows/{flow_id}
curl
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?