Skip to content

Delete Rule



POST /api/v1/sensitive_data_scanner/delete

Overview

Enter 1–100 rule UUIDs. Duplicates are removed before processing.

Prerequisites and Usage Steps

Enter 1–100 rule UUIDs. Duplicates are removed before processing. If any rule does not exist, is cross-Workspace, or has been deleted, the entire batch fails. Returns the rules that were actually deleted. The data scope is the Workspace to which the API Key belongs.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y Access key.
Example: <DF-API-KEY>
How to obtain or enter: Obtain the Key required by this API from API Key Management in the target Workspace.

Body Request Parameters

Parameter Name Type Required Description
sensitiveRuleUUIDs array Y Rule UUIDs to operate on, 1–100 strings. After deduplication, all objects must belong to the current Workspace; otherwise, the entire batch remains unchanged.
Allow null: False
Minimum length: 1
Maximum length: 100
Example: ['sdsr_32cc36108f2c4194a70fc12554583f20']
How to obtain or enter: Obtain content.data[].uuid from the Sensitive Data Scanning rule list, or content.ruleUUIDs[] from the create response.
sensitiveRuleUUIDs[*] string Maximum length: 48
Example: sdsr_32cc36108f2c4194a70fc12554583f20
How to obtain or enter: Obtain content.data[].uuid from the Sensitive Data Scanning rule list, or content.ruleUUIDs[] from the create response.

Additional Parameter Notes

Soft delete one or more rules. UUIDs that do not exist, have been deleted, or are cross-Workspace cause the entire batch request to fail.

Request Example

curl 'https://openapi.truewatch.com/api/v1/sensitive_data_scanner/delete' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"sensitiveRuleUUIDs":["sdsr_32cc36108f2c4194a70fc12554583f20"]}'

Response

HTTP 200, application/json.

Field Type Description
content.affectedRuleUUIDs array<string> UUIDs of the rules actually changed.
content.affectedCount integer Number of rules actually changed.
{
    "code": 200,
    "content": {
        "affectedRuleUUIDs": [
            "sdsr_32cc36108f2c4194a70fc12554583f20"
        ],
        "affectedCount": 1
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-EXAMPLE"
}

Error Response

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

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
400 ft.JsonFormatError The top level of the request body is not a JSON object JSON format error Submit a JSON object as the request body.
400 ft.RequestJsonFormatError JSON syntax error Request JSON format error Correct the JSON syntax.
403 ft.Forbidden Insufficient API permissions, or the current Workspace edition does not support it Forbidden Verify the Workspace that the Key belongs to, its permissions, and the Workspace edition.
406 ft.ParameterValidationFailed / ft.InvalidParameter Missing field or field value violates validation conditions Invalid parameter Check the JSON fields, types, and value ranges.
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 rule list in the current Workspace.