curl -G "https://qcg-api.scanova.io/console/usage/by-endpoint/" \
-H "Authorization: Bearer <your_oauth_access_token>" \
-d environment=live
[
{ "endpoint": "https://management.scanova.io/qr/", "method": "GET", "count": 2140, "error_rate": 0.004 },
{ "endpoint": "https://management.scanova.io/qr/", "method": "POST", "count": 318, "error_rate": 0.03 },
{ "endpoint": "https://management.scanova.io/qrcode/QR7K9M2XN/", "method": "PUT", "count": 96, "error_rate": 0.0 }
]
管理 API — 令牌与使用情况
按端点统计用量
GET /console/usage/by-endpoint/
GET
/
console
/
usage
/
by-endpoint
/
curl -G "https://qcg-api.scanova.io/console/usage/by-endpoint/" \
-H "Authorization: Bearer <your_oauth_access_token>" \
-d environment=live
[
{ "endpoint": "https://management.scanova.io/qr/", "method": "GET", "count": 2140, "error_rate": 0.004 },
{ "endpoint": "https://management.scanova.io/qr/", "method": "POST", "count": 318, "error_rate": 0.03 },
{ "endpoint": "https://management.scanova.io/qrcode/QR7K9M2XN/", "method": "PUT", "count": 96, "error_rate": 0.0 }
]
返回按端点和 HTTP 方法分组的请求次数——便于查看某个集成实际使用了 Management API 的哪些部分。位于常规的 Scanova API 主机(
qcg-api.scanova.io)上,使用您的仪表盘 OAuth 访问令牌进行身份验证。
请求
GET https://qcg-api.scanova.io/console/usage/by-endpoint/
Authorization: Bearer <your_oauth_access_token>
string
必填
sandbox、live、zapier、mcp 之一。选择要聚合哪些密钥的日志。curl -G "https://qcg-api.scanova.io/console/usage/by-endpoint/" \
-H "Authorization: Bearer <your_oauth_access_token>" \
-d environment=live
[
{ "endpoint": "https://management.scanova.io/qr/", "method": "GET", "count": 2140, "error_rate": 0.004 },
{ "endpoint": "https://management.scanova.io/qr/", "method": "POST", "count": 318, "error_rate": 0.03 },
{ "endpoint": "https://management.scanova.io/qrcode/QR7K9M2XN/", "method": "PUT", "count": 96, "error_rate": 0.0 }
]
响应字段
响应是一个数组,日志中出现的每一个不同的(endpoint, method) 组合对应一个条目,按 count 降序排列。
string
被记录的完整请求 URL,包含路径参数的实际值(例如某个具体的
qrid)——而不是规范化的路由模板。如果您用不同的 ID 调用过路径参数化的路由,预期会看到许多不同的条目。string
请求的 HTTP 方法,例如
GET、POST、PUT、DELETE。integer
针对此端点/方法组合记录的请求总数。
number
针对此端点/方法组合的请求中,返回状态码为
400 或以上的比例(0–1)。错误
environment 为必填项,校验规则与用量统计相同。
相关内容
- 用量统计 —— 同样的流量数据,以单一的滚动时间窗口总计呈现,而不是按端点细分。
- 每日用量 —— 同样的流量数据,按日历日而不是按路由拆分。
- Management API 概览 —— 本端点据以聚合的
environment取值(sandbox、live、zapier、mcp)。
授权
Send your Management API key as the raw value of the Authorization header — no "Bearer " or "Token " prefix, and no other characters. Example: Authorization: 401f7ac837da42b97f613d789819ff93537bee6a. A header containing more than one space-separated part is rejected outright. Requests also require the request's Host header to be the management API host (e.g. management.scanova.io) — the same key sent to the regular API host will not authenticate.
查询参数
响应
200
Usage grouped by endpoint
此页面对您有帮助吗?
⌘I