Governance

Approval analytics (time-to-approve, auto vs manual, bottlenecks)

Changed on

Aggregated approval KPIs for the requested window. Consumes the Policy Decision Log as the source of truth, pairs each require_approval verdict with its ApprovalRecord, and computes per-group breakdowns sorted with the slowest approvers first so bottlenecks surface at the top.

Requires the governance.read permission.

Responses are memoised per (tenant, window, group_by, limit) tuple for 30 seconds so dashboards can poll without thrashing the decision-log index.

get/api/v1/governance/approvals/analytics

Request

  • Base URL: http://localhost:8081
  • URL: http://localhost:8081/api/v1/governance/approvals/analytics
  • Auth: one of:
    • API key in header X-API-Key
    • HTTP bearer

Query parameters

window'24h' | '7d' | '30d'

Shorthand for since/until (wins when supplied). One of 24h, 7d, 30d.

sincestring

Inclusive lower bound (RFC3339 or unix milliseconds). Defaults to 24h before until.

untilstring

Exclusive upper bound (RFC3339 or unix milliseconds). Defaults to now.

group_by'overall' | 'rule' | 'agent' | 'topic'

Breakdown axis; overall returns only the window-wide summary.

limitinteger

Top-N rows per group (bounded at 50). Ignored when group_by=overall.

Headers

X-Tenant-IDstring required

Tenant isolation header (required on all protected routes).

Response

Approval analytics response

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      endpoint added