Skip to main content

List user logs API

List user logs API. GET /api/openapi/v1/user-logs, scope admin.v1.user-logs.read.

  • Scope: admin.v1.user-logs.read
  • GET/api/openapi/v1/user-logs
Reads logs for the authenticated application organization under its explicitly granted sensitive scope, independently of application member scope. User, AI and administrator log scopes do not imply one another. Business fields, filters and responses match the Console. List/export windows span at most seven calendar days. User log retention is 90 days for VPC and 180 days for K8S; AI log retention is 90 days. The server clips windows to retention and returns effective_from/effective_to on lists.

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

NameLocationTypeRequiredDescriptionExample
user_namequerystringNoUser name filter; maxLength=200-
auxiliary_identifierquerystringNoAuxiliary identity type; paired with auxiliary_value; maxLength=200-
auxiliary_valuequerystringNoAuxiliary identity value; requires type EMAIL, PHONE, EMPLOYEE_NO or ACCOUNT; maxLength=200-
actionquerystringNoAction type; maxLength=200-
descriptionquerystringNoOperation description filter; maxLength=200-
source_ipquerystringNoSource IP; maxLength=200-
qquerystringNoSearch keyword; maxLength=200-
resultquerystringNoExecution result; Values: "success", "failure"-
rangequerystringNoDefaults to the latest seven calendar days; ignored when from/to are supplied; default="last7"; Values: "last7"-
fromquerystring · date-timeNoStart time; must be paired with to, spanning at most seven calendar days-
toquerystring · date-timeNoEnd time; must follow from; window is clipped to Console retention-
department_idquerystring · uuidNoDepartment ID filter-
pagequeryinteger · int64NoPage number, starting at 1; minimum=1; default=1-
page_sizequeryinteger · int64NoPage size; default=20; Values: 10, 20, 50, 100-
timezonequerystringNoIANA timezone; defaults to UTC; maxLength=64-

Response statuses

HTTP statusTriggerResponse structureClient action
200SuccessSee “Response” on this pageRead the result.
401Authentication failedSee “General error” in “Configure the QwenWork console through APIs”Check status and code; correct parameters or grants; retry 503 later.
403Missing scope or invalid trusted identitySee “General error” in “Configure the QwenWork console through APIs”Check status and code; correct parameters or grants; retry 503 later.
422Invalid field or time windowSee “General error” in “Configure the QwenWork console through APIs”Check status and code; correct parameters or grants; retry 503 later.
503Upstream or audit dependency unavailableSee “General error” in “Configure the QwenWork console through APIs”Check status and code; correct parameters or grants; retry 503 later.
defaultOther authentication, business or dependency errorsSee “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
NameTypeRequiredDescriptionExample
effective_fromstring · date-timeYesEffective query start time-
effective_tostring · date-timeYesEffective query end time-
itemsarray\<object\>YesResults; empty array when no records match-
pageinteger · int64YesPage number, starting at 1-
page_sizeinteger · int64YesPage size-
totalinteger · int64YesTotal matching records-

items[]

FieldTypeRequiredDescription
event_descriptionstringYesEvent description
event_idstring · uuidYesEvent ID
event_timestring · date-timeYesEvent occurrence time
event_typestringYesEvent type; user operation type for user logs, ai.turn for AI logs; pattern="^[a-z][a-z0-9_]+$"
resultstringYesExecution result; Values: "success", "failure"
source_ipstringYesSource IP
user_email_snapshotstring | nullYesEmail snapshot at event time; may be null
user_idstring · uuidYesUser ID
user_name_snapshotstringYesUser name snapshot at event time