Skip to content

Enable/Disable



POST /api/v1/blacklist/batch_set_disable

Overview

Batch enable blacklist rules according to the current public contract.

Before Calling and Usage Steps

First verify each UUID, rule name, and its scope in the list, then submit the string array. The server processes only non-deleted matching items in the current Workspace; an empty array, all unknown UUIDs, or cross-Workspace UUIDs may also return true, and no per-item match results are provided.

The current public Body declares only blacklistUUIDs and lacks isDisable; when this field is not passed, the route defaults to false. Therefore, with the current public request, disabled rules can be restored to status=0. Submitting isDisable=true is rejected by unknown-field validation, and you cannot rely on the historical name on the page to promise full disable functionality; to disable, use the console. Enabled records remain unchanged, and deleted records are not restored. This is a rule configuration operation and does not delete historical data. The API result does not provide downstream propagation progress; after changes, verify the actual scope with controlled samples.

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
blacklistUUIDs[*] string String element. Do not pass null, numbers, or objects; otherwise, strip processing may return 500.
Example: blist_example
How to obtain or enter: Take a single rule UUID from Blacklist List.
blacklistUUIDs array Y Required array of rule UUIDs, not a comma-separated string. The server removes leading and trailing whitespace from each item and ignores empty strings; unmatched UUIDs are ignored in some batch operations, so you still need to verify them one by one.
Allows null: False
Example: ["blist_example"]
How to obtain or enter: Obtain the actual UUIDs from Blacklist List.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/blacklist/batch_set_disable' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"blacklistUUIDs":["blist_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; does not indicate that all UUIDs matched or that a status change occurred.
{
  "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 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 Fix the JSON according to content.reason, line, and column.
400 ft.JsonFormatError The JSON top level is not an object JSON file format error in some cases Submit a JSON object as described in the parameter table.
500 ft.InternalServerError Database, storage length/null, field shape, or subsequent processing exception Internal error Query the rule and its configuration before deciding whether to retry; if the failure persists, retain the traceId.
403 ft.Forbidden API Key lacks permission for the current operation You do not have permission to perform this operation Use an API Key for the current Workspace that has permission for the operations on this page. For actual feature availability, verify it against the site configuration.

Feedback

Is this page helpful?