Skip to main content

Inspect trust request

Inspect trust request. POST /api/openapi/v1/trusted-device-requests/{id}/inspections, scope admin.v1.trusted-device-requests.review.

  • Scope: admin.v1.trusted-device-requests.review
  • Permission: trusted device requests review
  • Permission type: manage
  • Endpoint: POST/api/openapi/v1/trusted-device-requests/{id}/inspections
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. This POST refreshes the request and effective policy and may delete obsolete unlocked pending requests. It is not a read-only detail endpoint.

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
idpathstring · uuidYesid-

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
requestobjectNoAssociated trust request; omitted when no request is available.-
resultstringYesProcessing result for the request; see enum values. Values: "already_processed", "already_trusted", "already_untrusted", "approved", "pending", "rejected"-

request

FieldTypeRequiredDescription
created_atstring · date-timeYesCreation time.
deviceobjectYesDevice information reported in the request.
idstringYesTrust request ID.
lockedbooleanYesWhether the current policy locks the request against manual review.
reasonstringYesRequest or processing reason.
review_commentstringYesReview comment.
reviewed_atstring · date-time | nullYesReview time; null before review.
reviewed_bystring | nullYesReviewer user ID; null before review.
reviewed_by_emailstringYesReviewer email.
reviewed_by_namestringYesReviewer display name.
statusstringYesRequest review status. Values: "approved", "pending", "rejected"
trusted_device_countinteger · int64YesCurrent number of trusted devices for this user.
userobjectYesUser associated with the device or request.
versioninteger · int64YesRecord version for concurrent-update validation.

request.device

FieldTypeRequiredDescription
client_device_idstringYesDevice identifier reported by the client. maxLength=255
device_namestringYesDevice name. maxLength=255
login_usernamestringNoDevice owner's login account. maxLength=255
mac_addressstring | nullNoDevice MAC address. maxLength=32
modelstringNoDevice model. maxLength=255
operating_systemstringNoDevice operating system. maxLength=128
serial_numberstring | nullNoDevice serial number. maxLength=255

request.user

FieldTypeRequiredDescription
department_idstring | nullYesDepartment ID.
department_namestringYesDepartment name.
department_pathstringYesDepartment hierarchy path.
departmentsarray\<object\>YesDepartments the user belongs to.
emailstringYesUser email.
employee_nostringYesEmployee number.
org_idstring · uuidYesOrganization ID.
user_idstring · uuidYesUser ID.
user_namestringYesUser display name.

request.user.departments[]

FieldTypeRequiredDescription
idstring · uuidYesDepartment ID.
namestringYesDepartment name.
pathstringYesDepartment hierarchy path.

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

This is a stateful pre-review inspection, not a read-only detail query. Current policy is checked; an obsolete unlocked pending request may be deleted when a device match exists. Missing requests may yield already_processed with request omitted. Frozen requests are retained; retries report current state.