DeleteKeyword

更新时间:
复制 MD 格式

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.

Warning

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.

ParameterTypeRequiredExampleDescription
KeywordLibIdStringYes2147The primary key ID of the text library.
IdsListNo[1,2]The IDs of the keywords to delete. At least one of Ids or Keywords must be specified.
KeywordsStringArrayNo["keyword1","keyword2"]The keyword values to delete. At least one of Ids or Keywords must be specified.
You must specify at least one of Ids or Keywords.

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
}