Agency RollupsThe agency's own API usage

The agency's own API usage

The agency's own API + MCP usage, daily per location/surface/route — request counts, auth failures, rate-limited and error counts, and latency. This is the same telemetry Mythic meters on. Takes no location_ids — usage is already the agency's own slice. Returns at most 1000 rows, newest and busiest first.

curl -X GET "https://mythic-analytics.gulp.workers.dev/client/v1/agency/usage?days_back=30" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "success": true,
  "data": {
    "days_back": 30,
    "usage": [
      {
        "day": "2026-08-27",
        "agency_id": "ag_xyz789",
        "location_id": "loc_abc123",
        "surface": "data",
        "route": "/client/v1/data/events",
        "requests": 412,
        "auth_failures": 3,
        "rate_limited": 0,
        "errors": 1,
        "avg_duration_ms": 84,
        "p95_duration_ms": 310
      }
    ]
  }
}
GET
/client/v1/agency/usage
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Agency key (ak_) only — a location secret key (sk_) gets 403 agency_required. Keys are server-side credentials; this surface serves no CORS headers on purpose. Agency-wide scoped keys (mcp_ with no fixed location) are accepted too and need agency:read; a client-bound mcp_ key gets 403 agency_key_required. See Using an mcp_ key over HTTP.

Agency key (ak_) only — a location secret key (sk_) gets 403 agency_required. Keys are server-side credentials; this surface serves no CORS headers on purpose. Agency-wide scoped keys (mcp_ with no fixed location) are accepted too and need agency:read; a client-bound mcp_ key gets 403 agency_key_required. See Using an mcp_ key over HTTP.
query
days_backinteger

Trailing window in days (1–90).

Min: 1 • Max: 90
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Agency key (ak_) only — a location secret key (sk_) gets 403 agency_required. Keys are server-side credentials; this surface serves no CORS headers on purpose. Agency-wide scoped keys (mcp_ with no fixed location) are accepted too and need agency:read; a client-bound mcp_ key gets 403 agency_key_required. See Using an mcp_ key over HTTP.

Query Parameters

days_backinteger

Trailing window in days (1–90).

Responses

successboolean
dataobject