Test sensitive words. POST /api/openapi/v1/sensitive-word-libraries/test, scope admin.v1.sensitive-words.manage.
- Scope:
admin.v1.sensitive-words.manage - Permission: Manage sensitive-word libraries
- Action: manage
- Endpoint: POST
/api/openapi/v1/sensitive-word-libraries/test
Authorization: Bearer \<API_KEY\>. The application must have subject_scope={"mode":"all"}; restricted scopes return 403. Scopes are independently granted. Do not cache responses.
Submit text to the existing sensitive-word service using the current organization configuration. Results, matching rules and audit behavior match the UI.
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.
| Name | Location | Type | Required | Description | Example |
|---|---|---|---|---|---|
text | body | string | Yes | text; maxLength=10000 | - |
Response statuses
| HTTP status | Trigger | Response structure | Client action |
|---|---|---|---|
200 | Request succeeded | See “Response” on this page | Read the response. |
default | Other authentication, authorization, validation or dependency errors | See “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
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
blocked | boolean | Yes | blocked | - |
matched_libraries | array\<object\> | null | Yes | matched libraries | - |
matched_libraries[]
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Record identifier |
name | string | Yes | Name |