Skip to main content

Export user logs API

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

  • Scope: admin.v1.user-logs.read
  • GET/api/openapi/v1/user-logs/export
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. CSV exports contain at most 10,000 rows; locale selects the language. Export returns no list pagination or effective_from/effective_to fields. No file bytes are released if audit commit fails. Content-Disposition supplies the download filename.

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-
timezonequerystringNoIANA timezone; defaults to UTC; maxLength=64-
localequerystringNoCSV content language; omission uses Simplified Chinese (zh-CN), independently of the Console user language; Values: "zh-CN", "zh-TW", "en"-

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: text/csv
NameTypeRequiredDescriptionExample
$bodystring · binaryYesComplete CSV file; $body denotes the body, not a JSON field.-