Search administrator audit logs. GET /api/openapi/v1/audit-logs/search, scope admin.v1.audit-logs.read.
- Scope:
admin.v1.audit-logs.read - Permission: Read administrator audit logs
- Action: read
- Endpoint: GET
/api/openapi/v1/audit-logs/search
Authorization: Bearer \<API_KEY\>. Scopes are independently granted. Do not cache responses.
Uses the administrator-log UI query service and Console query semantics: at most seven calendar days in the selected timezone, with q, repeated action_codes, category, result, range, timezone, from/to and pagination. page_size is 10/20/50/100.
The response includes effective_from/effective_to. Existing GET /audit-logs cursor pulling is unchanged. This endpoint only queries administrator logs.
Use /user-logs and /ai-logs with their separate sensitive read scopes for user and AI logs.
Common request headers
Apply the “Authentication and headers” section in “Configure the QwenWork console through APIs”: Authorization is required and X-Request-Id is optional. See this page for the required scope.
Whether Idempotency-Key applies and is required is specified in this page’s request parameters; a tracing identifier does not replace an idempotency key.
Request parameters
| Name | Location | Type | Required | Description | Example |
|---|---|---|---|---|---|
q | query | string | No | q; maxLength=200 | - |
action_codes | query | array\<string\> | null | No | action codes | - |
category | query | string | No | category; maxLength=64 | - |
result | query | string | No | result; enum=["success", "failure", "partial_success"] Values: "failure", "partial_success", "success" | - |
range | query | string | No | range; enum=["last7"], default="last7" default="last7" Values: "last7" | - |
timezone | query | string | No | timezone; maxLength=128 | - |
from | query | string · date-time | No | from; format="date-time" | - |
to | query | string · date-time | No | to; format="date-time" | - |
page | query | integer · int64 | No | Page number, starting at 1; format="int64", minimum=1, default=1 default=1 | - |
page_size | query | integer · int64 | No | Page size; format="int64", enum=[10, 20, 50, 100], default=20 default=20 Values: 10, 100, 20, 50 | - |
Response statuses
| HTTP status | Trigger | Response structure | Client action |
|---|---|---|---|
200 | Request succeeded | See “Response” on this page | Read the response. |
default | Other authentication, authorization, validation or dependency errors | See “General error” in “Configure the QwenWork console through APIs” | Handle the status and code; verify the result and idempotency requirements before retrying writes. |
Response
Content-Type: application/json
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
effective_from | string · date-time | Yes | effective from; format="date-time" | - |
effective_to | string · date-time | Yes | effective to; format="date-time" | - |
items | array\<object\> | null | Yes | items | - |
page | integer · int64 | Yes | Page number, starting at 1; format="int64" | - |
page_size | integer · int64 | Yes | Page size; format="int64" | - |
total | integer · int64 | Yes | Total matching records; format="int64" | - |
items[]
| Field | Type | Required | Description |
|---|---|---|---|
action_code | string | Yes | Actions |
actor_email_snapshot | string | No | Actor email at the time of the action |
actor_name_snapshot | string | No | Actor name at the time of the action |
actor_qid_snapshot | string | Yes | Actor QID at the time of the action |
actor_user_id | string | Yes | Actor ID |
after_display | string | null | Yes | Values after the change |
before_display | string | null | Yes | Values before the change |
category | string | Yes | Log category |
detail_attributes | object | Yes | Detail attributes |
detail_code | string | No | Detail code |
detail_text | string | No | Action details |
event_id | string | Yes | Event ID |
occurred_at | string · date-time | Yes | Time; format="date-time" |
resource_id | string | No | Resource ID |
resource_label | string | No | Target |
resource_type | string | Yes | Resource type |
result | string | Yes | Result |
source | string | Yes | Source |
source_ip | string | No | Source IP |
success_count | integer · int64 | No | Successful count; format="int64" |
target_count | integer · int64 | No | Target user count; format="int64" |
trace_id | string | No | Trace ID |