stats

List runs

Paginated run list for one environment. Narrow results with status_filter, agent_name, trigger_source, deployment_id, a preset time_range, or custom start_date and end_date; time filters apply to when runs were queued. Pass session_id, session_app_name, and session_user_id together to match one exact persistent session. search matches run ID, agent name, input, output and error text; it also accepts filter expressions like context.customer == 'acme'. Ordered by sort_by (queued, duration, tokens) in sort_dir direction; defaults to queue time, newest first. projection=summary leaves out connector_id, ab_test_ids, input, output, error and triggered_by; callers without the runs.view permission always get the summary projection. include_total=false skips counting and returns total: null.

Required permission: stats.view.

get/v1/projects/{project_id}/runs

Request

  • Base URL: https://api.connic.co
  • URL: https://api.connic.co/v1/projects/{project_id}/runs
  • Auth: HTTP bearer

Path parameters

project_idstring uuid required

ID of the project the API key belongs to.

Query parameters

environment_idstring uuid required

Environment to list runs from

deployment_idstring uuid nullable

Only runs executed by this deployment.

time_range'1h' | '6h' | '24h' | '7d' | '30d' | 'today' | 'this_month' | 'last_month' | 'this_year' nullable

Preset window ending now, or a calendar period in UTC. Ignored when both start_date and end_date are set.

start_datestring date-time nullable

Custom window start; applies only together with end_date and overrides time_range.

end_datestring date-time nullable

Custom window end; applies only together with start_date.

status_filterRunStatus[] nullable

Only runs in these statuses.

guardrail_outcomestring[] nullable

Only runs with at least one guardrail intervention of these outcomes.

agent_namestring nullable

Only runs of this agent.

trigger_source'manual' | 'connector' | 'agent' | 'deploy_gate'

How a run was started: manual by a user, connector by an inbound connector event, agent by another agent, or deploy_gate as a deployment test run.

How the run was triggered

test_namestring[] nullable

Filter by A/B test variant names; use base for runs without a variant

exclude_test_runsboolean

Exclude runs with a test name

searchstring nullable

Text matched against run ID, agent name, input, output and error, or a filter expression.

session_idstring nullable

Persistent session ID; requires session_app_name and session_user_id.

session_app_namestring nullable

Agent application name of the session; requires session_id.

session_user_idstring nullable

Agent user identity of the session; requires session_id.

sort_by'queued' | 'duration' | 'tokens'

Column to sort by

sort_dir'asc' | 'desc'

Sort direction

limitinteger

Page size, 1 to 250.

offsetinteger

Number of runs to skip.

projection'full' | 'summary'

full returns every run field; summary leaves out the content fields.

include_totalboolean

Include the filtered total count

convert_costs_to'EUR' | 'USD' nullable

Convert token costs to EUR or USD at the daily ECB reference rate of each model call

Response

Successful Response

totalinteger nullable required

Runs matching the filters across all pages. Null when include_total=false.

limitinteger required

Page size used.

offsetinteger required

Number of runs skipped.

Changes

No recorded changes to this operation across all 2 revisions of this API.