GET /billing/usage/{tenant_id}/endpoints
Query the TopN ranking of API endpoint call counts, including request count, error count, and average latency, for analyzing hot endpoints
Billing Service `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
tenant_id |
path |
string |
Yes |
|
|
|
Tenant ID |
app_id |
query |
string |
No |
|
|
|
Application ID (optional) |
limit |
query |
integer |
No |
20 |
|
|
Number of results |
days |
query |
integer |
No |
7 |
|
|
Number of days |
Responses
| Status | Description | Schema |
| 200 | Endpoint usage ranking query successful | dto.EndpointUsageDetailResponse |
| 400 | Invalid request parameters | object |
| 401 | Unauthorized | object |
| 500 | Internal server error | object |
Referenced Schemas
dto.EndpointUsageDetailResponse
dto.EndpointUsageItem
| Field | Type | Required | Example | Constraints | Description |
avg_latency_ms |
number |
No |
12.5 |
|
|
endpoint |
string |
No |
|
|
|
error_count |
integer |
No |
50 |
|
|
request_count |
integer |
No |
15000 |
|
|
dto.EndpointUsageListResponse
| Field | Type | Required | Example | Constraints | Description |
app_id |
string |
No |
app_001 |
|
|
days |
integer |
No |
7 |
|
|
endpoints |
array of
See dto.EndpointUsageItem |
No |
|
|
|
tenant_id |
string |
No |
tnt_xyz789 |
|
|