Skip to content

Enable/Disable



POST /api/v1/logging_query_rule/set_disable

Overview

Batch enable or disable access rules.

Before Calling and Usage Steps

Verify the UUIDs and affected identities first, then submit in batches. Enabling or disabling only changes the rule status; it does not change raw data or withdraw in-flight queries. Disabling means the rule no longer participates in subsequent scope/masking calculations, and the final permissions must be verified again. The API returns only true, not per-item results; invalid UUIDs among the input do not cause a 404. An empty array or all unmatched UUIDs can still return success true, which does not indicate the actual number of matches.

Saving a rule affects the data query scope/result masking for subsequent matching identities. It does not modify, delete, or backfill raw data, nor does it add baseline query permissions to roles. Multiple roles and rules are merged according to query-side policies; final permissions cannot be inferred from a single rule. Owner is exempt, and the administrator and workspace "Data Access Scope Restriction" settings change how roles with no match are handled. Validate with actual queries from representative members. After saving, the rule cache is invalidated, and immediate switching of all in-flight queries cannot be guaranteed.

This operation only changes the rule enabled status, then commits it to the database, clears the rule cache, and records an audit entry. It does not replace conditions or re-run cross-site configuration validation. On failure, read back the target status first, then handle incomplete cache or audit operations; no matches can still return true normally.

Request Headers

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

Body Request Parameters

Parameter Type Required Description
loggingQueryRuleUuids[*] string A single non-empty UUID; the original declaration does not perform per-item validation.
Example: lqrl_example
How to obtain or fill in: UUID of a single rule.
loggingQueryRuleUuids array Y Required array; non-empty is recommended. Only non-deleted matching items in the current workspace are matched; the logging module is further limited to logging.
Allow null: False
Example: ["lqrl_example"]
How to obtain or fill in: Obtain the target UUID set from Log Access Rules List.
isDisable boolean Y Required JSON boolean; true saves status=2, false saves 0, and deleted rules are not restored.
Allow null: False
Example: true
How to obtain or fill in: Use true to pause a rule and false to re-enable it.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/logging_query_rule/set_disable' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"loggingQueryRuleUuids":["lqrl_example"],"isDisable":true}'

Response

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

Field Type Description
content boolean Success is true; this is not a per-item result and does not mean all input UUIDs were modified.
{
  "code": 200,
  "content": true,
  "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
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 Invalid request JSON syntax Request JSON format error Fix 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 read the current status using the original UUIDs to confirm whether it has taken effect, then handle incomplete cache or audit operations; do not create the rule again. Retain the traceId.

Feedback

Is this page helpful?