Skip to content

Delete Sensitive Field Masking Rules



POST /api/v1/data_mask_rule/delete

Overview

Soft delete masking rules in the current workspace in batches.

Before You Call and Usage Steps

This write endpoint requires the dataRightsManage.workspaceConfigManage management permission.

Use the API Key of the target workspace. This group configures independent sensitive rules for the query return stage; it does not rewrite raw stored data, does not create fields, and is not a permanent deletion/anonymization API.

This API soft-deletes matching rules. It does not delete source data or roll back query results already returned to the client. Returning true does not mean every item in the request array matched; an empty batch and a complete miss may also succeed. You can safely verify the list and then process known states again, avoiding treating a non-match as a successful change. After the database commit, the rule cache is cleared by match category; a cache clear failure may return 500, but the state has already been committed. Read it back before retrying.

Effective application also depends on the target query chain, data category, and actual role set; role configuration is not data query authorization itself. When the same account/Key has multiple roles with query permission for that category, if one role has no applicable sensitive rule, this group of rules may not be applied as a whole. Do not bind only one role and assume all readers are forcibly masked; verify with the actual role/Key in Query Data and on the target display surface. The current regex replacement only processes string values; numbers, objects, arrays, booleans, and null are not automatically converted to string masks. For standard query matches, the matching string portions are replaced with *, and other text is retained. Saving regex checks uses the regex library, while the query execution path uses standard re. It is recommended to use only syntax compatible with Python standard re.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI Key with this operation permission from API Key Management in the target workspace.

Body Request Parameters

Parameter Name Type Required Description
dataMaskRuleUUIDs[*] string It is recommended that each item be a non-empty string; do not use true to determine that all UUIDs matched.
Example: wdmk_example
How to obtain or enter: Enter a single rule UUID, not a name.
dataMaskRuleUUIDs array Y Required array. [] can succeed but does not change rules; only undeleted records in the current workspace are processed. Unknown, out-of-workspace, or deleted UUIDs do not match and do not report errors item by item.
Allow null: False
Example: ["wdmk_example"]
How to obtain or enter: Select the target rule UUIDs item by item from the Masking Rule List.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/data_mask_rule/delete' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"dataMaskRuleUUIDs":["wdmk_example"]}'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content boolean Returns true when processing is complete; it does not include the match count or per-item status.
{
  "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 Handling Method
406 ft.ParameterValidationFailed Request field is missing or the field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError Invalid request JSON syntax Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The top level of the request JSON is not an object Some JSON file format errors Submit an object according to the example.
500 ft.InternalServerError Storage or response failure; a cache clear failure after a write is committed may also return 500 Internal error For write requests, read back through the list/details first, then decide whether to retry; keep the traceId and contact the administrator.

Feedback

Is this page helpful?