Query a workflow's runtime statistics

Reads how the executions of one workflow ran in one environment: how many finished, how many steps completed or failed, and how long steps took. The body is the dashboard spec's runtime source (the workflow-executor contract, section 15): a metric and the query members from, to, bucket and group_by (node_id, for the three step metrics only). The step statistics are read from the orchestrator's step rows, which are kept for 30 days, so a range that reaches further back finds nothing before that. executions counts the executions whose first terminal status (completed or failed) fell in the range, each once, in the bucket of that time, as the usage ledger does; an execution still running or waiting is not counted yet, a manual retry does not count an execution again, and an execution that finished before the first_finished_at column existed (migration 202611281000) is not counted. steps_completed and steps_failed count the step events whose time is in the range. step_duration_ms_avg is the mean duration of completed and failed steps, in milliseconds to the microsecond (a step under a millisecond counts with its length, one of 0 counts as 0, a step with no known duration does not count), and a group with no such step has no row, so an average that cannot be computed is absent and never 0. A count over a range where nothing ran is one row with value 0 (or no row when bucketed or grouped). Empty buckets and groups have no row. A bucketed range of more than 1000 buckets is a 400; a grouped result of more than 1000 rows is cut and truncated is true. The caller reads workflows of the companies its company read ability covers and needs the workflow's read abilities; any other workflow is 404. A query that runs over 30 seconds is cancelled with 504.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

The workflow id (UUID).

Query Params
uuid

The workflow environment (UUID) whose executions are counted. Absent means the company's production environment.

Body Params
string
enum
required
Allowed:
string
required

Start of the range, relative (-30d, -12h, -15m) or an RFC 3339 timestamp.

string

End of the range (exclusive), in the same form as from. Defaults to now.

string
enum

Time bucket width, yielding the column bucket.

Allowed:
group_by
array of strings
length ≤ 1

Group the step metrics by node. Not available for executions.

group_by
Allowed:
Responses

400

The request was malformed or contained invalid parameters.

401

You are not authorized

403

You are forbidden from accessing this resource

404

The item you were looking for does not exist

500

An unexpected error was encountered.

504

The query ran over 30 seconds and was cancelled; narrow its time range.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json