调用条件、权限、请求字段、响应字段与错误处理。
请求与权限
GEThttps://openapi.qwenwork.ai/v1/biz/operation-logs
鉴权:Authorization: Bearer <access_token>;使用用户 OAuth 授权获得的访问令牌。
所需业务 Scope:biz.audit.read
契约声明的授权方式:组织授权(organization)
Scope 需由平台为应用开通;用户须有相应业务权限,目标资源须在其可访问范围内。个人/组织方式是否为该应用开放,以控制台实际配置为准。
功能与限制
查询授权企业的管理员操作记录,适用于追溯谁在何时对成员、权限、设置等企业资源进行了操作。应用需要 biz.audit.read 授权,操作者需要 audit.read 权限,企业所有者和超级管理员沿用权限豁免。 首次请求可省略全部参数,默认查询最近 7 天。start/end 使用带时区时间,包含起点、排除终点,跨度最多 180 天,起止相等时为空窗口。category/action 使用审计目录中的分类和动作码,未知值或空字符串返回 400。target_type/target_id 按原始字符串精确匹配,空字符串也参与匹配。 可按操作者、操作、结果和关联对象筛选。组合 target_type、target_id、team_id 时,须由同一操作中的一条关联记录同时满足。响应返回该操作的主记录及历史姓名、角色和对象名称。 结果按 occurred_at、operation_id 倒序,时间保留微秒。下一页传入 next_cursor 并重复原筛选条件。省略时间时从游标恢复,显式传入时间须表示原窗口,可调整 limit。末页 next_cursor=null、has_more=false,每页均返回实际 window。 counts 中键缺失、null 和 0 含义不同,按原记录保留。settings_type 返回可公开的设置类别。分页期间记录可能变化,未查到记录时仍应结合业务页面核实操作结果。查询参数
| 参数 | 类型 | 必填 | 说明及约束 |
|---|---|---|---|
start | string | 否 | 包含的起点;须携带时区。省略规则见接口说明。 格式:"date-time" |
end | string | 否 | 不包含的终点;须携带时区。省略规则见接口说明。 格式:"date-time" |
cursor | string | 否 | 上一页 next_cursor;空串为首次,空白串/无效或不匹配游标返回400。翻页重复原筛选,省略时间从游标恢复。 最长长度:1024 |
limit | integer | 否 | 每页任意整数1–100,默认50;超过100由网关参数检查返回400,直达 Biz 校验返回422,不截断,可在翻页时调整。 默认值:50 格式:"int64" 最小值(含):1 最大值(含):100 |
actor_id | string | 否 | 精确匹配历史操作者 UUID。 格式:"uuid" |
actor_type | string | 否 | 操作者身份码:administrator 企业管理,console 平台运营。 可选值:["administrator", "console"] 最短长度:1 |
operation_id | string | 否 | 精确匹配审计操作 UUID,可用于再次查询主操作。 格式:"uuid" |
category | string | 否 | 审计目录分类码,精确匹配;未知或空串返回400。 最长长度:64 |
action | string | 否 | 审计动作目录中的原始码,精确匹配;未知或空串返回400,不校验与 category 的配对关系。 最长长度:128 |
outcome | string | 否 | 主操作结果精确匹配,不按 counts 重算。 可选值:["success", "failed", "unknown"] 最短长度:1 |
target_type | string | 否 | 关联对象类型精确匹配,不强制目录;空串按空字符串匹配。 最长长度:64 |
target_id | string | 否 | 关联对象 ID 精确匹配,不要求 UUID;空串按空字符串匹配。 最长长度:255 |
team_id | string | 否 | 精确匹配历史团队 UUID,不切换企业。 格式:"uuid" |
请求体
公开契约未声明请求体。不要自行添加身份字段或未经声明的业务字段。成功响应
保持各业务接口原始响应结构,不统一添加code/msg/data 包装。
HTTP 200
查询企业管理操作审计成功;所有声明字段出现,空列表为 []。 响应类型:application/json
Copy
{
"has_more": false,
"items": [
{
"action": "app.enterprise_settings.endpoints.upsert_enterprise_settings",
"actor_id": "00000000-0000-4000-8000-000000000001",
"actor_name_snapshot": "历史管理员",
"actor_role_snapshot": "admin",
"actor_type": "administrator",
"category": "settings",
"counts": {
"requested": 1,
"success": 1,
"unknown": null
},
"error_code": null,
"occurred_at": "2026-11-12T00:00:00.123456Z",
"operation_id": "00000000-0000-4000-8000-000000000002",
"outcome": "success",
"settings_type": "skillhub",
"target_id": null,
"target_name_snapshot": null,
"target_type": "enterprise",
"team_id": null
}
],
"next_cursor": null,
"window": {
"end": "2026-11-13T00:00:00Z",
"start": "2026-11-12T00:00:00Z"
}
}
| 字段 | 类型 | 必含 | 说明及约束 |
|---|---|---|---|
has_more | boolean | 是 | — |
items | array | 是 | — |
items[] | object | 否 | 额外字段:false |
items[].action | string | 是 | — |
items[].actor_id | string | 是 | — |
items[].actor_name_snapshot | string | null | 是 | — |
items[].actor_role_snapshot | string | null | 是 | 可选值:["member", "admin", "super_admin", "owner", null] |
items[].actor_type | string | 是 | 可选值:["administrator", "console"] |
items[].category | string | 是 | — |
items[].counts | object | 是 | 仅这六个统计键;缺失、null、0 分别保留,无统计为 {},不补零或强行求和。omitted_targets 不表示失败数。 额外字段:false |
items[].counts.failed | integer | null | 否 | 格式:"int64" 最小值(含):-9223372036854775808 最大值(含):9223372036854775807 |
items[].counts.omitted_targets | integer | null | 否 | 格式:"int64" 最小值(含):-9223372036854775808 最大值(含):9223372036854775807 |
items[].counts.requested | integer | null | 否 | 格式:"int64" 最小值(含):-9223372036854775808 最大值(含):9223372036854775807 |
items[].counts.skipped | integer | null | 否 | 格式:"int64" 最小值(含):-9223372036854775808 最大值(含):9223372036854775807 |
items[].counts.success | integer | null | 否 | 格式:"int64" 最小值(含):-9223372036854775808 最大值(含):9223372036854775807 |
items[].counts.unknown | integer | null | 否 | 格式:"int64" 最小值(含):-9223372036854775808 最大值(含):9223372036854775807 |
items[].error_code | string | null | 是 | — |
items[].occurred_at | string | 是 | 格式:"date-time" |
items[].operation_id | string | 是 | — |
items[].outcome | string | 是 | 可选值:["success", "failed", "unknown"] |
items[].settings_type | string | null | 是 | 仅 settings 分类或企业设置更新动作中,首个 field=settings_type 且 value_recorded 不为 false 的变更项 after 为已知设置码时返回;其他情况 null。 可选值:["skillhub", "member_list", "data_sharing_mode", "im_channel", "web_publishing", "industry_access", "security_policy", "ecosystem_market_publish", null] |
items[].target_id | string | null | 是 | — |
items[].target_name_snapshot | string | null | 是 | — |
items[].target_type | string | 是 | — |
items[].team_id | string | null | 是 | — |
next_cursor | string | null | 是 | — |
window | object | 是 | 额外字段:false |
window.end | string | 是 | 格式:"date-time" |
window.start | string | 是 | 格式:"date-time" |
错误响应
| HTTP | 说明及处理 |
|---|---|
400 | log_invalid_query:时间窗口、时区或业务筛选不合法;L03 还包括未知目录值、无效或不匹配游标。修正窗口/筛选后重试。网关先按公开 Schema 校验参数,类型、范围、枚举等不合法返回 OPENAPI_PARAMETER_INVALID,未知/重复参数分别返回 OPENAPI_QUERY_PARAMETER_UNKNOWN / OPENAPI_PARAMETER_DUPLICATED,非法编码返回 OPENAPI_QUERY_INVALID;均为400,不会到达 Biz。 |
401 | OPENAPI_TOKEN_MISSING、OPENAPI_TOKEN_INVALID 或 OPENAPI_TOKEN_EXPIRED:访问令牌缺失、无效或过期;使用有效的企业授权访问令牌。 |
403 | openapi_permission_denied:缺少企业组织授权、当前身份权限或开放 Scope;owner/超管也不能绕过企业授权及 Scope。核对授权企业及当前身份。 |
405 | Method Not Allowed |
413 | Request Entity Too Large |
415 | Unsupported Media Type |
422 | RequestValidationError:请求到达 Biz 后,原始参数解析或校验失败。网关与 Biz 校验不完全等价,例如 L01/L02 的 page=1e1、L03 的 limit=1e1 可通过网关数值校验,但 Biz 整数文本解析返回422;直接访问 Biz 时,未知/重复参数、非法编码、格式/类型/长度/枚举或页大小错误也返回422。修正 detail 中的参数后重试,不截断页大小。 |
429 | audit_log_read_limited:审计查询并发、等待或频率预算已满;按 Retry-After(秒)稍后重试。网关限流可返回 OPENAPI_RATE_LIMITED。 |
500 | Biz 内部处理失败;保留请求 ID 联系维护方,不将错误视为无日志。 |
502 | biz_openapi_unavailable:读取被取消;网关未取得有效响应或内容超过接口响应预算(OPENAPI_UPSTREAM_RESPONSE_TOO_LARGE)也返回502。缩小页大小后重试,仍失败时保留请求 ID 联系维护方。不会截断响应或返回半页。 |
503 | log_unavailable:日志依赖不可用、回查缺记录、返回数据无效或读取不完整。稍后重试,持续失败时保留请求 ID 联系维护方;不能解释为无日志。 |
504 | biz_openapi_unavailable 或网关 OPENAPI_TIMEOUT:读取超时;缩小查询范围或稍后重试。 |
完整字段契约
下方 JSON 包含本接口完整请求、响应、错误 Schema、嵌套约束和公开扩展定义,可复制用于核对。未声明的成功示例不作推测。展开完整接口 OpenAPI JSON
展开完整接口 OpenAPI JSON
Copy
{
"components": {
"schemas": {
"BizDomainErrorResponse": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"detail": {
"type": "string"
},
"error": {
"type": "string"
},
"org_status_reason": {
"description": "企业状态原因的原始 JSON 值,可为 null"
},
"request_id": {
"type": "string"
},
"seat_count": {
"description": "领域错误提供时返回的企业配置席位数",
"format": "int64",
"type": "integer"
},
"seat_used": {
"description": "领域错误提供时返回的企业已用席位数",
"format": "int64",
"type": "integer"
},
"trace_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"error",
"detail",
"request_id",
"trace_id"
],
"type": "object"
},
"BizGatewayErrorResponse": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
},
"OperationLog": {
"additionalProperties": false,
"properties": {
"action": {
"type": "string"
},
"actor_id": {
"type": "string"
},
"actor_name_snapshot": {
"type": [
"string",
"null"
]
},
"actor_role_snapshot": {
"enum": [
"member",
"admin",
"super_admin",
"owner",
null
],
"type": [
"string",
"null"
]
},
"actor_type": {
"enum": [
"administrator",
"console"
],
"type": "string"
},
"category": {
"type": "string"
},
"counts": {
"additionalProperties": false,
"description": "仅这六个统计键;缺失、null、0 分别保留,无统计为 {},不补零或强行求和。omitted_targets 不表示失败数。",
"properties": {
"failed": {
"format": "int64",
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": [
"integer",
"null"
]
},
"omitted_targets": {
"format": "int64",
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": [
"integer",
"null"
]
},
"requested": {
"format": "int64",
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": [
"integer",
"null"
]
},
"skipped": {
"format": "int64",
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": [
"integer",
"null"
]
},
"success": {
"format": "int64",
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": [
"integer",
"null"
]
},
"unknown": {
"format": "int64",
"maximum": 9223372036854775807,
"minimum": -9223372036854775808,
"type": [
"integer",
"null"
]
}
},
"type": "object"
},
"error_code": {
"type": [
"string",
"null"
]
},
"occurred_at": {
"format": "date-time",
"type": "string"
},
"operation_id": {
"type": "string"
},
"outcome": {
"enum": [
"success",
"failed",
"unknown"
],
"type": "string"
},
"settings_type": {
"description": "仅 settings 分类或企业设置更新动作中,首个 field=settings_type 且 value_recorded 不为 false 的变更项 after 为已知设置码时返回;其他情况 null。",
"enum": [
"skillhub",
"member_list",
"data_sharing_mode",
"im_channel",
"web_publishing",
"industry_access",
"security_policy",
"ecosystem_market_publish",
null
],
"type": [
"string",
"null"
]
},
"target_id": {
"type": [
"string",
"null"
]
},
"target_name_snapshot": {
"type": [
"string",
"null"
]
},
"target_type": {
"type": "string"
},
"team_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"operation_id",
"occurred_at",
"actor_id",
"actor_name_snapshot",
"actor_role_snapshot",
"actor_type",
"action",
"category",
"target_type",
"target_id",
"target_name_snapshot",
"team_id",
"settings_type",
"outcome",
"counts",
"error_code"
],
"type": "object"
},
"OperationLogPage": {
"additionalProperties": false,
"properties": {
"has_more": {
"type": "boolean"
},
"items": {
"items": {
"$ref": "#/components/schemas/OperationLog"
},
"type": "array"
},
"next_cursor": {
"type": [
"string",
"null"
]
},
"window": {
"$ref": "#/components/schemas/OperationLogWindow"
}
},
"required": [
"items",
"next_cursor",
"has_more",
"window"
],
"type": "object"
},
"OperationLogWindow": {
"additionalProperties": false,
"properties": {
"end": {
"format": "date-time",
"type": "string"
},
"start": {
"format": "date-time",
"type": "string"
}
},
"required": [
"start",
"end"
],
"type": "object"
},
"ValidationErrorResponse": {
"additionalProperties": false,
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationIssue"
},
"type": [
"array",
"null"
]
},
"error": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"error",
"detail",
"request_id",
"trace_id"
],
"type": "object"
},
"ValidationIssue": {
"additionalProperties": false,
"properties": {
"ctx": {
"additionalProperties": {},
"type": "object"
},
"input": {},
"loc": {
"items": {},
"type": [
"array",
"null"
]
},
"msg": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"type",
"loc",
"msg",
"input"
],
"type": "object"
}
},
"securitySchemes": {
"OpenPlatformBearer": {
"description": "企业授权应用访问令牌;Scope 不代替操作者权限与资源隔离",
"scheme": "bearer",
"type": "http"
}
}
},
"openapi": "3.1.0",
"paths": {
"/v1/biz/operation-logs": {
"get": {
"description": "查询授权企业的管理员操作记录,适用于追溯谁在何时对成员、权限、设置等企业资源进行了操作。应用需要 biz.audit.read 授权,操作者需要 audit.read 权限,企业所有者和超级管理员沿用权限豁免。\n\n首次请求可省略全部参数,默认查询最近 7 天。start/end 使用带时区时间,包含起点、排除终点,跨度最多 180 天,起止相等时为空窗口。category/action 使用审计目录中的分类和动作码,未知值或空字符串返回 400。target_type/target_id 按原始字符串精确匹配,空字符串也参与匹配。\n\n可按操作者、操作、结果和关联对象筛选。组合 target_type、target_id、team_id 时,须由同一操作中的一条关联记录同时满足。响应返回该操作的主记录及历史姓名、角色和对象名称。\n\n结果按 occurred_at、operation_id 倒序,时间保留微秒。下一页传入 next_cursor 并重复原筛选条件。省略时间时从游标恢复,显式传入时间须表示原窗口,可调整 limit。末页 next_cursor=null、has_more=false,每页均返回实际 window。\n\ncounts 中键缺失、null 和 0 含义不同,按原记录保留。settings_type 返回可公开的设置类别。分页期间记录可能变化,未查到记录时仍应结合业务页面核实操作结果。",
"operationId": "biz-list-operation-logs",
"parameters": [
{
"description": "包含的起点;须携带时区。省略规则见接口说明。",
"in": "query",
"name": "start",
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"description": "不包含的终点;须携带时区。省略规则见接口说明。",
"in": "query",
"name": "end",
"schema": {
"format": "date-time",
"type": "string"
}
},
{
"description": "上一页 next_cursor;空串为首次,空白串/无效或不匹配游标返回400。翻页重复原筛选,省略时间从游标恢复。",
"in": "query",
"name": "cursor",
"schema": {
"maxLength": 1024,
"type": "string"
}
},
{
"description": "每页任意整数1–100,默认50;超过100由网关参数检查返回400,直达 Biz 校验返回422,不截断,可在翻页时调整。",
"in": "query",
"name": "limit",
"schema": {
"default": 50,
"format": "int64",
"maximum": 100,
"minimum": 1,
"type": "integer"
}
},
{
"description": "精确匹配历史操作者 UUID。",
"in": "query",
"name": "actor_id",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "操作者身份码:administrator 企业管理,console 平台运营。",
"in": "query",
"name": "actor_type",
"schema": {
"enum": [
"administrator",
"console"
],
"minLength": 1,
"type": "string"
}
},
{
"description": "精确匹配审计操作 UUID,可用于再次查询主操作。",
"in": "query",
"name": "operation_id",
"schema": {
"format": "uuid",
"type": "string"
}
},
{
"description": "审计目录分类码,精确匹配;未知或空串返回400。",
"in": "query",
"name": "category",
"schema": {
"maxLength": 64,
"type": "string"
}
},
{
"description": "审计动作目录中的原始码,精确匹配;未知或空串返回400,不校验与 category 的配对关系。",
"in": "query",
"name": "action",
"schema": {
"maxLength": 128,
"type": "string"
}
},
{
"description": "主操作结果精确匹配,不按 counts 重算。",
"in": "query",
"name": "outcome",
"schema": {
"enum": [
"success",
"failed",
"unknown"
],
"minLength": 1,
"type": "string"
}
},
{
"description": "关联对象类型精确匹配,不强制目录;空串按空字符串匹配。",
"in": "query",
"name": "target_type",
"schema": {
"maxLength": 64,
"type": "string"
}
},
{
"description": "关联对象 ID 精确匹配,不要求 UUID;空串按空字符串匹配。",
"in": "query",
"name": "target_id",
"schema": {
"maxLength": 255,
"type": "string"
}
},
{
"description": "精确匹配历史团队 UUID,不切换企业。",
"in": "query",
"name": "team_id",
"schema": {
"format": "uuid",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"example": {
"has_more": false,
"items": [
{
"action": "app.enterprise_settings.endpoints.upsert_enterprise_settings",
"actor_id": "00000000-0000-4000-8000-000000000001",
"actor_name_snapshot": "历史管理员",
"actor_role_snapshot": "admin",
"actor_type": "administrator",
"category": "settings",
"counts": {
"requested": 1,
"success": 1,
"unknown": null
},
"error_code": null,
"occurred_at": "2026-11-12T00:00:00.123456Z",
"operation_id": "00000000-0000-4000-8000-000000000002",
"outcome": "success",
"settings_type": "skillhub",
"target_id": null,
"target_name_snapshot": null,
"target_type": "enterprise",
"team_id": null
}
],
"next_cursor": null,
"window": {
"end": "2026-11-13T00:00:00Z",
"start": "2026-11-12T00:00:00Z"
}
},
"schema": {
"$ref": "#/components/schemas/OperationLogPage"
}
}
},
"description": "查询企业管理操作审计成功;所有声明字段出现,空列表为 []。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"400": {
"content": {
"application/json": {
"example": {
"code": "log_invalid_query",
"detail": "Invalid log query window, filter or cursor",
"error": "BadRequest",
"request_id": "example-request",
"trace_id": null
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "log_invalid_query:时间窗口、时区或业务筛选不合法;L03 还包括未知目录值、无效或不匹配游标。修正窗口/筛选后重试。网关先按公开 Schema 校验参数,类型、范围、枚举等不合法返回 OPENAPI_PARAMETER_INVALID,未知/重复参数分别返回 OPENAPI_QUERY_PARAMETER_UNKNOWN / OPENAPI_PARAMETER_DUPLICATED,非法编码返回 OPENAPI_QUERY_INVALID;均为400,不会到达 Biz。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"401": {
"content": {
"application/json": {
"example": {
"code": 401,
"data": null,
"error_code": "OPENAPI_TOKEN_INVALID",
"msg": "Unauthorized"
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "OPENAPI_TOKEN_MISSING、OPENAPI_TOKEN_INVALID 或 OPENAPI_TOKEN_EXPIRED:访问令牌缺失、无效或过期;使用有效的企业授权访问令牌。",
"headers": {
"WWW-Authenticate": {
"schema": {
"type": "string"
}
},
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"403": {
"content": {
"application/json": {
"example": {
"code": "openapi_permission_denied",
"detail": "Organization authorization and operator permissions are required",
"error": "Forbidden",
"request_id": "example-request",
"trace_id": null
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "openapi_permission_denied:缺少企业组织授权、当前身份权限或开放 Scope;owner/超管也不能绕过企业授权及 Scope。核对授权企业及当前身份。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"405": {
"content": {
"application/json": {
"example": {
"code": 405,
"data": null,
"error_code": "OPENAPI_METHOD_NOT_ALLOWED",
"msg": "Method Not Allowed"
},
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Method Not Allowed",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"413": {
"content": {
"application/json": {
"example": {
"code": 413,
"data": null,
"error_code": "OPENAPI_REQUEST_TOO_LARGE",
"msg": "Request Entity Too Large"
},
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Request Entity Too Large",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"415": {
"content": {
"application/json": {
"example": {
"code": 415,
"data": null,
"error_code": "OPENAPI_UNSUPPORTED_MEDIA_TYPE",
"msg": "Unsupported Media Type"
},
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Unsupported Media Type",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"422": {
"content": {
"application/json": {
"example": {
"detail": [
{
"input": null,
"loc": [
"query",
"limit"
],
"msg": "Invalid pagination parameters",
"type": "value_error"
}
],
"error": "RequestValidationError",
"request_id": "example-request",
"trace_id": null
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ValidationErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "RequestValidationError:请求到达 Biz 后,原始参数解析或校验失败。网关与 Biz 校验不完全等价,例如 L01/L02 的 page=1e1、L03 的 limit=1e1 可通过网关数值校验,但 Biz 整数文本解析返回422;直接访问 Biz 时,未知/重复参数、非法编码、格式/类型/长度/枚举或页大小错误也返回422。修正 detail 中的参数后重试,不截断页大小。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"429": {
"content": {
"application/json": {
"example": {
"code": "audit_log_read_limited",
"detail": "Audit log reader is busy",
"error": "TooManyRequests",
"request_id": "example-request",
"trace_id": null
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "audit_log_read_limited:审计查询并发、等待或频率预算已满;按 Retry-After(秒)稍后重试。网关限流可返回 OPENAPI_RATE_LIMITED。",
"headers": {
"Retry-After": {
"description": "Seconds to wait before retrying.",
"schema": {
"type": "string"
}
},
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"500": {
"content": {
"application/json": {
"example": {
"detail": "An internal error occurred.",
"error": "InternalServerError",
"request_id": "example-request",
"trace_id": null
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "Biz 内部处理失败;保留请求 ID 联系维护方,不将错误视为无日志。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"502": {
"content": {
"application/json": {
"example": {
"code": "biz_openapi_unavailable",
"detail": "Biz service is unavailable",
"error": "BizUnavailable",
"request_id": "example-request",
"trace_id": null
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "biz_openapi_unavailable:读取被取消;网关未取得有效响应或内容超过接口响应预算(OPENAPI_UPSTREAM_RESPONSE_TOO_LARGE)也返回502。缩小页大小后重试,仍失败时保留请求 ID 联系维护方。不会截断响应或返回半页。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"503": {
"content": {
"application/json": {
"example": {
"code": "log_unavailable",
"detail": "Log records are unavailable",
"error": "ServiceUnavailable",
"request_id": "example-request",
"trace_id": null
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "log_unavailable:日志依赖不可用、回查缺记录、返回数据无效或读取不完整。稍后重试,持续失败时保留请求 ID 联系维护方;不能解释为无日志。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"504": {
"content": {
"application/json": {
"example": {
"code": "biz_openapi_unavailable",
"detail": "Biz service is unavailable",
"error": "BizUnavailable",
"request_id": "example-request",
"trace_id": null
},
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "biz_openapi_unavailable 或网关 OPENAPI_TIMEOUT:读取超时;缩小查询范围或稍后重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
}
},
"security": [
{
"OpenPlatformBearer": []
}
],
"summary": "查询企业管理操作审计",
"tags": [
"日志与审计"
]
}
}
},
"info": {
"title": "查询企业管理操作审计",
"version": "2026-11-24"
},
"servers": [
{
"url": "https://openapi.qwenwork.ai"
}
]
}