管理员日志读取
- Scope:
admin.v1.audit-logs.read - 权限项:管理员日志读取(
audit-logs) - 权限类型:读取
- 接口:GET
/api/openapi/v1/audit-logs
认证与请求头
使用应用 API Key 调用。当前接口只校验上方独立 Scope;读取、管理与执行权限互不隐含。
| 名称 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Authorization | header | string | 是 | 应用 API Key,使用 Bearer 方式传递。 | Bearer qwk_*** |
X-Request-Id | header | string | 否 | 可选的调用追踪标识;未传入时由服务端生成。 | req-20260831-001 |
请求参数
| 名称 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
from | query | string · date-time | 必填 | Inclusive creation/event time, RFC3339 with timezone; keep fixed while paging. | "2026-08-27T10:00:00Z" |
to | query | string · date-time | 必填 | Exclusive creation/event time, after from and at most 180 days later; keep fixed while paging. | "2026-08-27T10:00:00Z" |
cursor | query | string | 否 | Opaque next_cursor from the previous page of the same organization and time interval. | "<string>" |
page_size | query | integer · int64 | 否 | - | 20 |
请求示例
cURL
curl --request GET \
--url 'https://example.invalid/api/openapi/v1/audit-logs?from=<from>&to=<to>&cursor=<cursor>&page_size=20' \
--header 'Authorization: Bearer <API_KEY>'响应
200 OK
| 名称 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
has_more | boolean | 是 | - | false |
items | array<OpenapifacadeAuditLog> | 是 | - | [{"action_code":"<string>","actor_auxiliary_identifier_snapshot":"<string>","actor_auxiliary_value_snapshot":"<string>","actor_email_snapshot":"<string>","actor_name_snapshot":"<string>","actor_qid_snapshot":"<string>","actor_user_id":"<string>","after_display":"<string>","before_display":"<string>","category":"<string>","detail_attributes":{},"detail_code":"<string>","detail_text":"<string>","event_id":"<string>","http_method":"<string>","occurred_at":"2026-08-27T10:00:00Z","operation_id":"<string>","org_id":"<string>","payload_hash":"<string>","replay_of_event_id":"<string>","request_id":"<string>","resource_id":"<string>","resource_label":"<string>","resource_type":"<string>","result":"<string>","route_template":"<string>","schema_version":0,"source":"<string>","source_ip":"<string>","source_service":"<string>","success_count":0,"target_count":0,"trace_id":"<string>"}] |
items[].action_code | string | 是 | - | "<string>" |
items[].actor_auxiliary_identifier_snapshot | string | 是 | - | "<string>" |
items[].actor_auxiliary_value_snapshot | string | 是 | - | "<string>" |
items[].actor_email_snapshot | string | 否 | - | "<string>" |
items[].actor_name_snapshot | string | 否 | - | "<string>" |
items[].actor_qid_snapshot | string | 是 | - | "<string>" |
items[].actor_user_id | string | 是 | - | "<string>" |
items[].after_display | string | null | 是 | - | "<string>" |
items[].before_display | string | null | 是 | - | "<string>" |
items[].category | string | 是 | - | "<string>" |
items[].detail_attributes | object | 是 | - | {} |
items[].detail_code | string | 否 | - | "<string>" |
items[].detail_text | string | 否 | - | "<string>" |
items[].event_id | string | 是 | - | "<string>" |
items[].http_method | string | 是 | - | "<string>" |
items[].occurred_at | string · date-time | 是 | - | "2026-08-27T10:00:00Z" |
items[].operation_id | string | 是 | - | "<string>" |
items[].org_id | string | 是 | - | "<string>" |
items[].payload_hash | string | 是 | - | "<string>" |
items[].replay_of_event_id | string | null | 是 | - | "<string>" |
items[].request_id | string | 是 | - | "<string>" |
items[].resource_id | string | 否 | - | "<string>" |
items[].resource_label | string | 否 | - | "<string>" |
items[].resource_type | string | 是 | - | "<string>" |
items[].result | string | 是 | - | "<string>" |
items[].route_template | string | 是 | - | "<string>" |
items[].schema_version | integer · int64 | 是 | - | 0 |
items[].source | string | 是 | - | "<string>" |
items[].source_ip | string | 否 | - | "<string>" |
items[].source_service | string | 是 | - | "<string>" |
items[].success_count | integer · int64 | 否 | - | 0 |
items[].target_count | integer · int64 | 否 | - | 0 |
items[].trace_id | string | 否 | - | "<string>" |
next_cursor | string | 是 | - | "<string>" |
响应示例
{
"has_more": false,
"items": [
{
"action_code": "<string>",
"actor_auxiliary_identifier_snapshot": "<string>",
"actor_auxiliary_value_snapshot": "<string>",
"actor_email_snapshot": "<string>",
"actor_name_snapshot": "<string>",
"actor_qid_snapshot": "<string>",
"actor_user_id": "<string>",
"after_display": "<string>",
"before_display": "<string>",
"category": "<string>",
"detail_attributes": {},
"detail_code": "<string>",
"detail_text": "<string>",
"event_id": "<string>",
"http_method": "<string>",
"occurred_at": "2026-08-27T10:00:00Z",
"operation_id": "<string>",
"org_id": "<string>",
"payload_hash": "<string>",
"replay_of_event_id": "<string>",
"request_id": "<string>",
"resource_id": "<string>",
"resource_label": "<string>",
"resource_type": "<string>",
"result": "<string>",
"route_template": "<string>",
"schema_version": 0,
"source": "<string>",
"source_ip": "<string>",
"source_service": "<string>",
"success_count": 0,
"target_count": 0,
"trace_id": "<string>"
}
],
"next_cursor": "<string>"
}default Flat business error
| 名称 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
code | string | 否 | Stable business error code | "<string>" |
detail | string | 是 | Human-readable error description | "<string>" |
details | OpenapiErrorDetails | 否 | - | {"field":"<string>","reason":"<string>","suggestion":"<string>"} |
details.field | string | 否 | Request field that failed validation | "<string>" |
details.reason | string | 否 | Stable validation failure reason | "<string>" |
details.suggestion | string | 否 | Suggested normalized value | "<string>" |
error | string | 是 | Stable HTTP error type | "<string>" |
响应示例
{
"code": "<string>",
"detail": "<string>",
"details": {
"field": "<string>",
"reason": "<string>",
"suggestion": "<string>"
},
"error": "<string>"
}