GET /auth/usage/history/v2
查询使用历史
REST API 概览 · OpenAPI JSON · OpenAPI YAML
| 稳定性 | 认证 | 费用 | Operation ID |
|---|---|---|---|
| 已发布 | Bearer API 密钥 | 免费 | get_usage_history_v2_api_v1_auth_usage_history_v2_get |
| 名称 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
start_date | query | 否 | string | null | 开始日期 (YYYY-MM-DD) |
end_date | query | 否 | string | null | 结束日期 (YYYY-MM-DD) |
event_type | query | 否 | string | null | 事件类型过滤 |
kind | query | 否 | string | null | 事件分组过滤 |
success | query | 否 | boolean | null | 是否成功 |
billable_success | query | 否 | boolean | null | 是否可计费 |
outcome | query | 否 | string | null | 执行 outcome 过滤 |
reason_code | query | 否 | string | null | 执行 reason_code 过滤 |
has_execution_outcome | query | 否 | boolean | null | 是否存在 execution_outcome |
charge_outcome | query | 否 | string | null | 收费结果过滤 |
anomaly | query | 否 | string | null | 异常类型过滤 |
search_id | query | 否 | string | null | search_id 聚焦过滤 |
execution_id | query | 否 | string | null | execution_id 聚焦过滤 |
api_key_id | query | 否 | string | null | API Key 归因过滤 |
page | query | 否 | integer | 页码 |
page_size | query | 否 | integer | 每页数量 |
include_details | query | 否 | boolean | 是否在列表中返回完整审计详情字段 |
min_credits | query | 否 | number | null | — |
max_credits | query | 否 | number | null | — |
bucket | query | 否 | string | null | — |
summary | query | 否 | boolean | — |
limit | query | 否 | integer | null | — |
此操作没有 JSON 请求体。
curl --request GET \
--url "https://qveris.cn/api/v1/auth/usage/history/v2" \
--header "Authorization: Bearer $QVERIS_API_KEY"
const response = await fetch("https://qveris.cn/api/v1/auth/usage/history/v2", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.QVERIS_API_KEY}`,
},
})
if (!response.ok) throw new Error(`QVeris request failed: ${response.status}`)
console.log(await response.json())
import os
import requests
response = requests.request(
"GET",
"https://qveris.cn/api/v1/auth/usage/history/v2",
headers={"Authorization": f"Bearer {os.environ['QVERIS_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())
| 状态码 | 含义 | Schema |
|---|---|---|
200 | Successful Response | APIResponse_UsageEventsResponse_ |
400 | Invalid audit query | APIResponse_dict_ |
422 | Validation Error | HTTPValidationError |
{
"status": "success",
"message": "Usage events retrieved successfully",
"status_code": 0,
"data": {
"items": [
{
"id": "evt_01HZX9R31GH2R",
"event_type": "tool_execute",
"source_system": "qveris_website",
"source_ref_type": "execute_history",
"source_ref_id": "2b7f7c4a-9f3a-4f61-8b59-3a983a8192a0",
"session_id": "sess_7Q9m",
"search_id": "srch_01HZX9QK7J3M9T",
"execution_id": "exec_01HZX9R2R4S2E",
"tool_id": "openweathermap.weather.execute.v1",
"success": true,
"charge_outcome": "charged",
"duration_ms": 211,
"billing_snapshot_status": "upstream_provided",
"pre_settlement_amount_credits": 5,
"settled_amount_credits": 5,
"actual_amount_credits": 5,
"credits_ledger_entry_id": "led_01HZX9R39K6QZ",
"display_target": "openweathermap.weather.execute.v1",
"billing_summary": "5 credits per successful request",
"created_at": "2026-05-16T08:30:12Z"
}
],
"total": 1,
"page": 1,
"page_size": 50,
"summary": null
}
}
这个页面对你有帮助吗?