Skip to content

Delete Data Access Rules



POST /api/v1/data_query_rule/delete

Overview

Soft delete access rules in batches.

Before Calling and Usage Steps

Verify the UUIDs and affected identities before submitting in batches. This only soft deletes rules; it does not delete source data and is not equivalent to revoking a role's basic query permissions. After deletion, the rule can no longer be read using this module's get operation and cannot be restored through the enable API. Only true is returned; per-item results are not provided, and some invalid UUIDs will not cause a 404 for that reason. An empty array or all unmatched UUIDs can still succeed with true, which does not indicate the actual number of matches.

This operation only soft deletes rules and commits to the database, then clears rule caches and records audit logs. It does not replace rule definitions or re-run cross-site configuration validation. On failure, first confirm the deletion status from the list/details using the original UUIDs, then handle incomplete cache or audit operations.

Changes to rule status affect the data query scope/result masking for subsequent eligible identities. They do not modify, delete, or backfill raw data, nor do they add basic query permissions to roles. Multiple roles and rules are merged according to query-side policies; the final permissions cannot be inferred from a single rule. Owner is exempt. The "Data Access Scope Restriction" settings for administrators and workspaces change how roles with no match are handled; verify with an actual query performed by a representative member. Rule caches are invalidated after a status change, and not all in-flight queries are guaranteed to switch immediately.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y Workspace OpenAPI authentication credential.
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
queryRuleUuids[*] string A single non-empty UUID; the original declaration does not validate each item.
Example: lqrl_example
How to obtain or enter: A single rule UUID.
queryRuleUuids array Y Required array; non-empty is recommended. Only non-deleted matching items in the current workspace are considered; the logging module additionally restricts matches to logging.
Allows null: False
Example: ["lqrl_example"]
How to obtain or enter: Obtain the target UUID set from the Data Access Rule List.

Request Example

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

Response

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

Field Type Description
content boolean true on success; this is not a per-item result and does not mean all input UUIDs have been modified.
{
  "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
406 ft.ParameterValidationFailed A request field is missing, or a field value violates the declared validation conditions Parameter parsing failed Check the parameter location, field name, type, and value.
400 ft.RequestJsonFormatError The request JSON syntax is invalid Request JSON format error Correct the JSON according to content.reason, line, and column.
500 ft.InternalServerError An unhandled exception occurs during database status commit, Redis rule cache, or audit Internal error First query the current status by the original rule UUID to confirm whether it has taken effect. If committed, handle incomplete cache or audit operations, retain the traceId, and do not repeatedly create the rule.

Feedback

Is this page helpful?