Skip to content

Delete a Single Security Detection Rule



POST /api/v1/security_rule/delete

Overview

Delete a single existing security rule that you have permission to operate on.

Before Calling and Usage Steps

Soft-delete a single rule by rule UUID. First query the rule list of the current workspace. After deletion, repeated calls return that the rule does not exist. If a write request times out, first check the existing rule and scheduling status, confirm the result, and then retry.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y OpenAPI Key of the target workspace. Obtain it through API Key Management in the workspace.

Body Request Parameters

Parameter Name Type Required Description
ruleUUID string Y UUID of a single security detection rule.
Null allowed: False
Empty string allowed: False
Example: srul_example
How to obtain or enter: Take content.data[].uuid from Security Detection Rule List.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/security_rule/delete' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"ruleUUID": "srul_example"}'

Response

HTTP 200, application/json.

Field Type Description
content boolean true when the operation succeeds.
{
    "code": 200,
    "content": true,
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed / ft.InvalidParameter Missing field, or type or configuration does not meet requirements Invalid parameter Check the fields and values against the request parameter table.
403 ft.Forbidden The API Key lacks API permission, or does not have operation permission for the current AI rule Access forbidden Confirm the Key's workspace, permissions, and target rule.
400 ft.UnsupportFreeWorkspaceSecurityCfg The current workspace plan does not support security configuration Plan not supported Confirm the target workspace plan.
404 ft.ObjectNotExists The rule does not exist, has been deleted, or does not belong to the current workspace Rule does not exist Obtain the UUID again from the current workspace's rule list.
403 ft.ForbiddenCspmOperation / ft.ForbiddenSiemOperation / ft.ForbiddenAbaOperation The caller does not have operation permission for the corresponding category of security rules Rule operation denied Check permissions for the corresponding rule category.
400 ft.OuterFuncFailed AI scheduling update, start/stop, or cleanup was not confirmed External function call failed Use traceId to check the current state of the rule and scheduling, and then decide whether to retry.

Feedback

Is this page helpful?