Requirements, permissions, request and response fields, and error handling.
Request and permissions
GET https://openapi.qwenwork.ai/v1/biz/operation-logs
Authentication: Authorization: Bearer <access_token>; use an access token obtained through user OAuth authorization.
Required business Scope: biz.audit.read
Authorization method declared in the contract: Organization authorization (organization)
The platform must enable the Scope for the application. The user must have the required business permissions, and the target resource must be within their accessible scope. Availability of personal or organization authorization depends on the application's actual console configuration.
Behavior and limitations
Query administrator operations in the authorized organization to trace who acted on members, permissions, settings, and other organization resources, and when. The application requires biz.audit.read authorization, and the operator requires audit.read permission. Organization owners and super administrators retain their permission exemptions.
All parameters may be omitted on the first request; the default window is the last 7 days. start/end require timezone-aware timestamps. The start is inclusive and the end exclusive, with a maximum span of 180 days. Equal start and end values define an empty window. category/action use category and action codes from the audit catalog; unknown values or empty strings return 400. target_type/target_id match raw strings exactly, including empty strings.
Filter by actor, operation, outcome, and related target. When target_type, target_id, and team_id are combined, a single related record within the same operation must satisfy all filters. The response returns the operation's primary record and historical name, role, and target name snapshots.
Results are ordered by occurred_at and operation_id descending, with microsecond timestamp precision. For the next page, pass next_cursor and repeat the original filters. Omitted times are restored from the cursor; explicitly supplied times must represent the original window. limit may be adjusted. On the last page, next_cursor=null and has_more=false. Every page returns the actual window.
Missing keys, null, and 0 in counts have different meanings and are preserved from the original record. settings_type returns publicly available setting categories. Records may change during pagination. Even when no record is found, verify the operation's result on the relevant business page.
Query parameters
| Parameter | Type | Required | Description and constraints |
|---|---|---|---|
start | string | No | Inclusive start; timezone required. See the API description for omission rules. Format: "date-time" |
end | string | No | Exclusive end; timezone required. See the API description for omission rules. Format: "date-time" |
cursor | string | No | The previous page's next_cursor. An empty string starts the first page; whitespace-only, invalid, or mismatched cursors return 400. Repeat the original filters when paging; omitted times are restored from the cursor. Maximum length: 1024 |
limit | integer | No | Any integer from 1–100 per page; defaults to 50. Values above 100 return 400 from gateway parameter checks or 422 when validated directly by Biz. Values are not capped. May be adjusted between pages. Default: 50 Format: "int64" Minimum (inclusive): 1 Maximum (inclusive): 100 |
actor_id | string | No | Exact match on the historical actor UUID. Format: "uuid" |
actor_type | string | No | Actor identity code: administrator for organization administration; console for platform operations. Allowed values: ["administrator", "console"] Minimum length: 1 |
operation_id | string | No | Exact match on the audit operation UUID; can be used to retrieve the primary operation again. Format: "uuid" |
category | string | No | Exact match on an audit catalog category code; unknown or empty values return 400. Maximum length: 64 |
action | string | No | Exact match on a raw audit action catalog code; unknown or empty values return 400. Pairing with category is not validated. Maximum length: 128 |
outcome | string | No | Exact match on the primary operation's outcome; not recalculated from counts. Allowed values: ["success", "failed", "unknown"] Minimum length: 1 |
target_type | string | No | Exact match on the related target type; not restricted to the catalog. Empty strings match empty strings. Maximum length: 64 |
target_id | string | No | Exact match on the related target ID; UUID format is not required. Empty strings match empty strings. Maximum length: 255 |
team_id | string | No | Exact match on the historical team UUID; does not switch organizations. Format: "uuid" |
Request body
The public contract does not declare a request body. Do not add identity fields or undeclared business fields.
Success response
Preserve each business API's original response structure. Do not add a common code/msg/data wrapper.
HTTP 200
Organization management audit logs retrieved successfully. All declared fields are present; empty lists are [].
Response type: application/json
| Field | Type | Required | Description and constraints |
|---|---|---|---|
has_more | boolean | Yes | — |
items | array | Yes | — |
items[] | object | No | Additional properties: false |
items[].action | string | Yes | — |
items[].actor_id | string | Yes | — |
items[].actor_name_snapshot | string | null | Yes | — |
items[].actor_role_snapshot | string | null | Yes | Allowed values: ["member", "admin", "super_admin", "owner", null] |
items[].actor_type | string | Yes | Allowed values: ["administrator", "console"] |
items[].category | string | Yes | — |
items[].counts | object | Yes | Only these six count keys are allowed. Missing keys, null, and 0 are preserved distinctly. No statistics is represented as {}; values are not zero-filled or forcibly summed. omitted_targets is not a failure count. Additional properties: false |
items[].counts.failed | integer | null | No | Format: "int64" Minimum (inclusive): -9223372036854775808 Maximum (inclusive): 9223372036854775807 |
items[].counts.omitted_targets | integer | null | No | Format: "int64" Minimum (inclusive): -9223372036854775808 Maximum (inclusive): 9223372036854775807 |
items[].counts.requested | integer | null | No | Format: "int64" Minimum (inclusive): -9223372036854775808 Maximum (inclusive): 9223372036854775807 |
items[].counts.skipped | integer | null | No | Format: "int64" Minimum (inclusive): -9223372036854775808 Maximum (inclusive): 9223372036854775807 |
items[].counts.success | integer | null | No | Format: "int64" Minimum (inclusive): -9223372036854775808 Maximum (inclusive): 9223372036854775807 |
items[].counts.unknown | integer | null | No | Format: "int64" Minimum (inclusive): -9223372036854775808 Maximum (inclusive): 9223372036854775807 |
items[].error_code | string | null | Yes | — |
items[].occurred_at | string | Yes | Format: "date-time" |
items[].operation_id | string | Yes | — |
items[].outcome | string | Yes | Allowed values: ["success", "failed", "unknown"] |
items[].settings_type | string | null | Yes | Returned only for the settings category or organization settings update actions when after in the first change item with field=settings_type and value_recorded not false is a known setting code; otherwise null. Allowed values: ["skillhub", "member_list", "data_sharing_mode", "im_channel", "web_publishing", "industry_access", "security_policy", "ecosystem_market_publish", null] |
items[].target_id | string | null | Yes | — |
items[].target_name_snapshot | string | null | Yes | — |
items[].target_type | string | Yes | — |
items[].team_id | string | null | Yes | — |
next_cursor | string | null | Yes | — |
window | object | Yes | Additional properties: false |
window.end | string | Yes | Format: "date-time" |
window.start | string | Yes | Format: "date-time" |
Error responses
| HTTP | Description and handling |
|---|---|
400 | log_invalid_query: Invalid time window, timezone, or business filters. For L03, this also includes unknown catalog values and invalid or mismatched cursors. Correct the window/filters before retrying. The gateway first validates parameters against the public schema. Invalid types, ranges, or enums return OPENAPI_PARAMETER_INVALID; unknown/duplicate parameters return OPENAPI_QUERY_PARAMETER_UNKNOWN / OPENAPI_PARAMETER_DUPLICATED, respectively; invalid encoding returns OPENAPI_QUERY_INVALID. All return 400 and do not reach Biz. |
401 | OPENAPI_TOKEN_MISSING, OPENAPI_TOKEN_INVALID, or OPENAPI_TOKEN_EXPIRED: The access token is missing, invalid, or expired. Use a valid organization-authorized access token. |
403 | openapi_permission_denied: Missing organization authorization, current identity permissions, or enabled Scope. Even owner/super administrators cannot bypass organization authorization and Scope requirements. Verify the authorized organization and current identity. |
405 | Method Not Allowed |
413 | Request Entity Too Large |
415 | Unsupported Media Type |
422 | RequestValidationError: Raw parameter parsing or validation failed after the request reached Biz. Gateway and Biz validation are not fully equivalent. For example, page=1e1 in L01/L02 and limit=1e1 in L03 can pass gateway numeric validation, but Biz integer text parsing returns 422. When accessing Biz directly, unknown/duplicate parameters, invalid encoding, and format/type/length/enum or page size errors also return 422. Correct the parameters indicated in detail before retrying. Page sizes are not capped. |
429 | audit_log_read_limited: Audit query concurrency, waiting, or rate budgets are exhausted. Retry after Retry-After seconds. Gateway rate limiting may return OPENAPI_RATE_LIMITED. |
500 | Internal Biz processing failed. Retain the request ID and contact support. Do not interpret the error as an absence of logs. |
502 | biz_openapi_unavailable: The read was cancelled. The gateway also returns 502 if it does not receive a valid response or the content exceeds the API response budget (OPENAPI_UPSTREAM_RESPONSE_TOO_LARGE). Reduce the page size and retry. If the failure persists, retain the request ID and contact support. Responses are not truncated and partial pages are not returned. |
503 | log_unavailable: A log dependency is unavailable, records are missing during lookup, returned data is invalid, or the read is incomplete. Retry later. If the failure persists, retain the request ID and contact support. Do not interpret this as an absence of logs. |
504 | biz_openapi_unavailable or gateway OPENAPI_TIMEOUT: The read timed out. Narrow the query range or retry later. |
Complete field contract
The JSON below contains this API's complete request, response, and error schemas, nested constraints, and public extension definitions. Copy it for reference. No success examples are inferred where none are declared.
Expand the complete API OpenAPI JSON
Expand the complete API OpenAPI JSON