查询 OAuth 使用历史
GET /oauth/usage_history
查询 OAuth 使用历史
REST API 概览 · OpenAPI JSON · OpenAPI YAML
接口契约
| 稳定性 | 认证 | 费用 | Operation ID |
|---|---|---|---|
| 已发布 | OAuth Account Resource Access Token | 免费 | oauth_usage_history_api_v1_oauth_usage_history_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 归因过滤 |
oauth_client_id | query | 否 | string | null | OAuth client_id 归因过滤 |
credential_type | query | 否 | string | null | 凭证类型过滤 |
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.ai/api/v1/oauth/usage_history" \
--header "Authorization: Bearer $QVERIS_ACCOUNT_ACCESS_TOKEN"
const response = await fetch("https://qveris.ai/api/v1/oauth/usage_history", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.QVERIS_ACCOUNT_ACCESS_TOKEN}`,
},
})
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.ai/api/v1/oauth/usage_history",
headers={"Authorization": f"Bearer {os.environ['QVERIS_ACCOUNT_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())
响应
| 状态码 | 含义 | Schema |
|---|---|---|
200 | Successful Response | APIResponse_UsageEventsResponse_ |
422 | Validation Error | HTTPValidationError |
成功响应示例
{
"status": "string",
"message": "string"
}
精确契约
- 稳定版 JSON: OpenAPI JSON
- 稳定版 YAML: OpenAPI YAML
- 版本化 JSON: OpenAPI v1 JSON
- 版本化 YAML: OpenAPI v1 YAML
