GET /api/operator/v1/tenant/run-analytics — cross-run analytics for THIS workspace (#626 BIG15 C1 §28): the slowest workflow steps (per `workflow_node_key` p95 + max duration) and the failure counts per workflow. Read-only, scoped to the authorized workspace (owner/admin) — mirrors `tenant_dispatch_metrics`, with an optional `?since=` window bound.
const url = 'https://example.com/api/operator/v1/tenant/run-analytics';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/operator/v1/tenant/run-analyticsParameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Range start (inclusive) on runs.created_at. Absent ⇒ the last 30 days.
Responses
Section titled “Responses”The tenant run-analytics snapshot (#626 BIG15 C1 §28): the slowest steps + the
per-workflow failure counts, both scoped to one workspace. Empty vectors read as
0-count on a workspace with no completed/failed runs in the window.
object
The workflows with failures, most-failures first (≤20).
One workflow’s failure profile (the errors-per-workflow gauge): the workflow id +
name, the number of failed runs and the total runs over the window.
object
Runs in failed status.
Total runs (any status) — the failure denominator.
The workflow name, or "" when the workflow row was deleted (honest-empty).
The slowest workflow steps (by p95), most-slow first (≤20).
One slow workflow step (the slowest-steps gauge): a workflow_node_key with its
p95 + max wall-clock duration (seconds) over the window and the run count the
percentile is computed from.
object
The maximum step duration in seconds.
The workflow node key the runs share (e.g. implement, review).
The 95th-percentile step duration in seconds.
The number of completed runs the p95/max are computed from.
Examplegenerated
{ "errors_per_workflow": [ { "failures": 1, "total": 1, "workflow_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "workflow_name": "example" } ], "slowest_steps": [ { "max_secs": 1, "node_key": "example", "p95_secs": 1, "runs": 1 } ]}Authentication required
The canonical JSON body of every error response — the single source of truth
the frontend binds to. Every AppError serializes as this exact shape, and
the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is
what the frontend error schema is generated from, so there is no hand-written
error schema on either end.
object
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Example
{ "code": "not_found"}Permission denied
The canonical JSON body of every error response — the single source of truth
the frontend binds to. Every AppError serializes as this exact shape, and
the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is
what the frontend error schema is generated from, so there is no hand-written
error schema on either end.
object
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Example
{ "code": "not_found"}Structured server error
The canonical JSON body of every error response — the single source of truth
the frontend binds to. Every AppError serializes as this exact shape, and
the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is
what the frontend error schema is generated from, so there is no hand-written
error schema on either end.
object
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Example
{ "code": "not_found"}