GET /billing/usage/{tenant_id}/endpoints

查询API端点调用次数TopN排行,含请求数、错误数和平均延迟,用于分析热点接口

计费服务 `bearerAuth` application/json

请求参数

名称位置类型必填默认值示例约束描述
tenant_id path string 是 租户ID
app_id query string 否 应用ID(可选)
limit query integer 否 20 返回条数
days query integer 否 7 统计天数

响应

状态描述Schema
200端点用量排行查询成功service-billing/internal/handler/dto.EndpointUsageDetailResponse
400请求参数错误object
401未授权object
500服务器内部错误object

引用的 Schema

service-billing/internal/handler/dto.EndpointUsageDetailResponse

字段类型必填示例约束描述
code integer 否
data service-billing/internal/handler/dto.EndpointUsageListResponse 否
message string 否
timestamp string 否

service-billing/internal/handler/dto.EndpointUsageItem

字段类型必填示例约束描述
avg_latency_ms number 否 12.5
endpoint string 否
error_count integer 否 50
request_count integer 否 15000

service-billing/internal/handler/dto.EndpointUsageListResponse

字段类型必填示例约束描述
app_id string 否 app_001
days integer 否 7
endpoints array of

参见 service-billing/internal/handler/dto.EndpointUsageItem

否
tenant_id string 否 tnt_xyz789