Deletes one or more keywords or text patterns from a custom text library. Deleted entries cannot be restored.
Operation description
Use this operation to remove keywords or text patterns from a custom text library used for text anti-spam detection. You can identify entries to delete by ID, by keyword value, or both.
The effect of this operation is the same as manually deleting entries in the Alibaba Cloud AI Guardrails console.
Deleted keywords and text patterns cannot be restored. Proceed with caution.
Billing: This operation is free of charge.
For information about how to construct an HTTP request, see Request structure. You can also use an SDK — see SDK overview.
QPS limits
Up to 10 calls per second per account. Exceeding this limit triggers throttling and may affect your service.
Request parameters
For common parameters required in all AI Guardrails API requests, see Common parameters.
The following parameters are specific to this operation.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| KeywordLibId | String | Yes | 2147 | The primary key ID of the text library. |
| Ids | List | No | [1,2] | The IDs of the keywords to delete. At least one of Ids or Keywords must be specified. |
| Keywords | StringArray | No | ["keyword1","keyword2"] | The keyword values to delete. At least one of Ids or Keywords must be specified. |
You must specify at least one ofIdsorKeywords.
Response parameters
This operation returns only common response parameters. See Common response parameters.
Examples
Sample request
http(s)://green.cn-shanghai.aliyuncs.com/?Action=DeleteKeyword
&<Common request parameters>
{
"KeywordLibId": "2147",
"Id": [1,2]
}Sample success response
{
"requestId": "795D8871-4889-4C0F-A8B1-C7D2B990FF61",
"code": 200
}