Skip to main content
GET
/
mcp-hub
/
usage
Get MCP Hub API Usage Summary
curl --request GET \
  --url https://api.enkryptai.com/mcp-hub/usage \
  --header 'apikey: <api-key>'
{
  "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "window": {
    "start": "2023-11-07T05:31:56Z",
    "end": "2023-11-07T05:31:56Z",
    "label": "30d"
  },
  "total_calls": 12345,
  "successful_calls": 12000,
  "by_endpoint": [
    {
      "endpoint": "scans_list",
      "calls": 5000,
      "successful": 4900
    }
  ],
  "top_endpoints": [
    {
      "endpoint": "scans_list",
      "calls": 5000,
      "successful": 4900
    }
  ],
  "by_project": [
    {
      "project_name": "default",
      "calls": 3200
    }
  ],
  "by_status_class": [
    {
      "status_class": 200,
      "calls": 12000
    }
  ],
  "by_day": [
    {
      "day": "2026-06-20",
      "calls": 420,
      "successful": 410
    }
  ],
  "generated_at": "2023-11-07T05:31:56Z"
}

Authorizations

apikey
string
header
required

Query Parameters

period
enum<string>
default:30d

Relative window ending now. One of 24h, 7d, 30d, 90d. Ignored when start/end are supplied. Defaults to 30d.

Available options:
24h,
7d,
30d,
90d
start
string<date-time>

Start of a custom window (RFC3339). When set, overrides period. The window is capped at 90 days.

end
string<date-time>

End of a custom window (RFC3339). Defaults to now. The window is capped at 90 days.

Response

Aggregate usage summary for the organization

Aggregate-only usage summary for the calling organization. No raw call records are returned.

org_id
string<uuid>
window
MCPHubUsageWindow · object

The resolved time window the summary covers.

total_calls
integer
Example:

12345

successful_calls
integer

Calls that returned a 2xx status.

Example:

12000

by_endpoint
MCPHubUsageEndpointStat · object[]

Per-endpoint call counts, ordered by calls descending.

top_endpoints
MCPHubUsageEndpointStat · object[]

The five most-called endpoints (a subset of by_endpoint).

by_project
MCPHubUsageProjectStat · object[]

Per-project call counts, ordered by calls descending.

by_status_class
MCPHubUsageStatusStat · object[]

Call counts grouped by HTTP status class.

by_day
MCPHubUsageDayStat · object[]

Daily call counts across the window (UTC), ordered by day ascending.

generated_at
string<date-time>