Skip to main content

Search administrator audit logs

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
Use 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

NameLocationTypeRequiredDescriptionExample
qquerystringNoq; maxLength=200-
action_codesqueryarray\<string\> | nullNoaction codes-
categoryquerystringNocategory; maxLength=64-
resultquerystringNoresult; enum=["success", "failure", "partial_success"] Values: "failure", "partial_success", "success"-
rangequerystringNorange; enum=["last7"], default="last7" default="last7" Values: "last7"-
timezonequerystringNotimezone; maxLength=128-
fromquerystring · date-timeNofrom; format="date-time"-
toquerystring · date-timeNoto; format="date-time"-
pagequeryinteger · int64NoPage number, starting at 1; format="int64", minimum=1, default=1 default=1-
page_sizequeryinteger · int64NoPage size; format="int64", enum=[10, 20, 50, 100], default=20 default=20 Values: 10, 100, 20, 50-

Response statuses

HTTP statusTriggerResponse structureClient action
200Request succeededSee “Response” on this pageRead the response.
defaultOther authentication, authorization, validation or dependency errorsSee “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
NameTypeRequiredDescriptionExample
effective_fromstring · date-timeYeseffective from; format="date-time"-
effective_tostring · date-timeYeseffective to; format="date-time"-
itemsarray\<object\> | nullYesitems-
pageinteger · int64YesPage number, starting at 1; format="int64"-
page_sizeinteger · int64YesPage size; format="int64"-
totalinteger · int64YesTotal matching records; format="int64"-

items[]

FieldTypeRequiredDescription
action_codestringYesActions
actor_email_snapshotstringNoActor email at the time of the action
actor_name_snapshotstringNoActor name at the time of the action
actor_qid_snapshotstringYesActor QID at the time of the action
actor_user_idstringYesActor ID
after_displaystring | nullYesValues after the change
before_displaystring | nullYesValues before the change
categorystringYesLog category
detail_attributesobjectYesDetail attributes
detail_codestringNoDetail code
detail_textstringNoAction details
event_idstringYesEvent ID
occurred_atstring · date-timeYesTime; format="date-time"
resource_idstringNoResource ID
resource_labelstringNoTarget
resource_typestringYesResource type
resultstringYesResult
sourcestringYesSource
source_ipstringNoSource IP
success_countinteger · int64NoSuccessful count; format="int64"
target_countinteger · int64NoTarget user count; format="int64"
trace_idstringNoTrace ID

Errors and retries

Existing UI error codes and validation are preserved. 401/403 indicate authentication or authorization failure; 409 requires rereading before retry; 413 indicates an oversized request; 400/422 indicate invalid input; 503 indicates an unavailable dependency. The response and machine contract are authoritative. Retry idempotent creates with the same Idempotency-Key and payload.