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-analyticsGET /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.
Parameters
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”OK
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.
Example generated
{ "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. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
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).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Permission denied
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
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).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Structured server error
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
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).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}