Skip to main content

Batch delete trusted devices

Batch delete trusted devices. POST /api/openapi/v1/trusted-devices/batch-deletions, scope admin.v1.trusted-devices.manage.

  • Scope: admin.v1.trusted-devices.manage
  • Permission: trusted devices manage
  • Permission type: manage
  • Endpoint: POST/api/openapi/v1/trusted-devices/batch-deletions
Use Authorization: Bearer \<API_KEY\>. This endpoint requires an application with subject_scope={"mode":"all"}. Restricted or invalid user scopes return 403 openapi_subject_scope_denied before business execution. Scopes do not imply each other. Organization and application actor come from verified authentication, not request parameters.

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

Request body: required; Content-Type: application/json.
NameLocationTypeRequiredDescriptionExample
idsbodyarray\<string\> | nullYesids minItems=1 maxItems=1000-

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
deletedinteger · int64YesNumber of devices actually deleted.-
requestedinteger · int64YesNumber of devices requested for deletion.-

Errors

Uses the existing {error, detail, code} error envelope. Invalid credentials: 401/403; missing Scope or non-all user scope: 403; missing resource: 404; conflict/stale version: 409; invalid input: 400/422; unavailable dependency: 503. Business errors retain Console semantics.

Semantics and safety

At most 1,000 IDs. Existing deletion uses IDs without per-item version conditions or failure details. Compare requested and deleted; a successful response does not mean every requested ID was deleted.