List AI logs API. GET /api/openapi/v1/ai-logs, scope admin.v1.ai-logs.read.
- Scope:
admin.v1.ai-logs.read - GET
/api/openapi/v1/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 |
|---|---|---|---|---|---|
user_name | query | string | No | User name filter; maxLength=200 | - |
auxiliary_identifier | query | string | No | Auxiliary identity type; paired with auxiliary_value; maxLength=200 | - |
auxiliary_value | query | string | No | Auxiliary identity value; requires type EMAIL, PHONE, EMPLOYEE_NO or ACCOUNT; maxLength=200 | - |
session_id | query | string | No | Session ID; omitted for user logs when not collected; maxLength=200 | - |
turn_id | query | string | No | Turn ID; maxLength=200 | - |
conversation_title | query | string | No | Conversation title; maxLength=200 | - |
q | query | string | No | Search keyword; maxLength=200 | - |
result | query | string | No | Execution result; Values: "success", "failure" | - |
range | query | string | No | Defaults to the latest seven calendar days; ignored when from/to are supplied; default="last7"; Values: "last7" | - |
from | query | string · date-time | No | Start time; must be paired with to, spanning at most seven calendar days | - |
to | query | string · date-time | No | End time; must follow from; window is clipped to Console retention | - |
department_id | query | string · uuid | No | Department ID filter | - |
page | query | integer · int64 | No | Page number, starting at 1; minimum=1; default=1 | - |
page_size | query | integer · int64 | No | Page size; default=20; Values: 10, 20, 50, 100 | - |
timezone | query | string | No | IANA timezone; defaults to UTC; maxLength=64 | - |
Response statuses
| HTTP status | Trigger | Response structure | Client action |
|---|---|---|---|
200 | Success | See “Response” on this page | Read the result. |
401 | Authentication failed | See “General error” in “Configure the QwenWork console through APIs” | Check status and code; correct parameters or grants; retry 503 later. |
403 | Missing scope or invalid trusted identity | See “General error” in “Configure the QwenWork console through APIs” | Check status and code; correct parameters or grants; retry 503 later. |
422 | Invalid field or time window | See “General error” in “Configure the QwenWork console through APIs” | Check status and code; correct parameters or grants; retry 503 later. |
503 | Upstream or audit dependency unavailable | See “General error” in “Configure the QwenWork console through APIs” | Check status and code; correct parameters or grants; retry 503 later. |
default | Other authentication, business or dependency errors | See “General error” in “Configure the QwenWork console through APIs” | Check status and code; correct parameters or grants; retry 503 later. |
Response
Content-Type: application/json
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
effective_from | string · date-time | Yes | Effective query start time | - |
effective_to | string · date-time | Yes | Effective query end time | - |
items | array\<object\> | Yes | Results; empty array when no records match | - |
page | integer · int64 | Yes | Page number, starting at 1 | - |
page_size | integer · int64 | Yes | Page size | - |
total | integer · int64 | Yes | Total matching records | - |
items[]
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Action type |
data | object | Yes | Log detail data; omitted for user logs when not collected |
department_id_snapshot | string · uuid | No | Primary department ID snapshot; omitted when unavailable |
department_name_snapshot | string | No | Primary department name snapshot; omitted when unavailable |
department_path_snapshot | string | No | Primary department path snapshot; omitted when unavailable |
department_snapshots | array\<object\> | No | All department snapshots at event time; omitted when unavailable |
event_id | string · uuid | Yes | Event ID |
event_name | string | No | Event name; omitted when empty |
event_time | string · date-time | Yes | Event occurrence time |
event_type | string | Yes | Event type; user operation type for user logs, ai.turn for AI logs; Values: "ai.turn" |
result | string | Yes | Execution result; Values: "success", "failure" |
session_id | string | Yes | Session ID; omitted for user logs when not collected |
source | string | Yes | Event source; Values: "pc" |
source_ip | string | Yes | Source IP |
turn_id | string | Yes | Turn ID |
user_email_snapshot | string | null | Yes | Email snapshot at event time; may be null |
user_id | string · uuid | Yes | User ID |
user_name_snapshot | string | Yes | User name snapshot at event time |
items[].data
| Field | Type | Required | Description |
|---|---|---|---|
artifacts | array\<string\> | Yes | Artifacts; empty array when there are no artifacts |
calls | array\<object\> | Yes | Call details; empty array when there are no calls |
conversation_title | string | Yes | Conversation title |
extensions | object | Yes | Event extensions; preserves current UI extension keys and values |
model | string | Yes | Model used |
uploaded_file_names | array\<string\> | No | Attachment names for this turn; omitted when not collected, empty array means no attachments; preserves order and duplicates; maxItems=100 |
items[].data.calls[]
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name |
result | string | Yes | Execution result; Values: "success", "failure" |
type | string | Yes | Call type; Values: "skill", "connector", "plugin" |
items[].department_snapshots[]
| Field | Type | Required | Description |
|---|---|---|---|
id | string · uuid | Yes | Identifier |
name | string | Yes | Name |
path | string | Yes | Department path |