Skip to content

Modify



POST /api/v1/blacklist/{blist_uuid}/modify

Overview

Modify the name, category, source, and conditions of a blacklist rule as a whole.

Before Calling and Usage Steps

First read the details and back up the complete configuration, then provide name, type, and the complete source/conditions. This endpoint is not a partial patch: omitting desc/source/sources/filters clears them to default values such as ""/[] respectively; you cannot submit only the name and expect the scope to be preserved. The original status is retained; modifying a disabled rule does not automatically enable it. Name/condition duplicate checks include disabled rules; cases such as a nonexistent target return 404.

Leaf operations: = (is), != (is_not/is not), >, >=, <, <= only take the first item of value; in and not_in (not in) match a set; match/contain and not_match/not_contain perform contains matching; regexp (re) and not_regexp perform regular expression matching, and the original expression is entered as the regular expression value; wildcard/not_wildcard use string wildcard values; exist/exists and not_exist/not_exists check field existence. Operations of the exist type still require a non-empty value array to pass the current validation; you can enter ["ignored"], and this value does not participate in the condition. Do not copy the type=group/rule structure of the log index advancedFilter.

For numeric values, it is recommended to pass JSON numbers directly. The new logic writes parseable numeric strings into the generated conditions only when a source of the same type can confirm that the field is numeric and the operation is comparison/equality/set; the original filters remain unchanged. When the field type is unknown/conflicting, the query fails, or metric does not infer it, the original string is retained; string matching/regular expressions are not converted either. A successful save does not guarantee that unknown fields or unconvertible numeric values can match.

This is a rule configuration operation and does not delete historical data. The endpoint result does not provide downstream propagation progress; after changes, verify the actual scope with controlled samples.

Path Parameters

Parameter Type Required Description
blist_uuid string Y Path UUID of a non-deleted rule in the current workspace; both enabled and disabled rules can be read/modified.
null allowed: False
Example: blist_example
How to obtain or enter: Get it from content.data[].uuid in the blacklist list.

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 enter: Obtain an OpenAPI Key with the required operation permission from API Key Management in the target workspace.

Body Parameters

Parameter Type Required Description
sources[*] string A single source name; do not enter a UUID or regular expression wrapper; to use all sources, use the top-level source.
Example: nginx
How to obtain or enter: Enter a single real source name.
filters[*] json A single leaf condition. It is recommended to explicitly provide name/condition/operation/value; array members are not fully validated against the declaration, and an incorrect shape may cause a 500.
Example: {"name": "path", "condition": "and", "operation": "=", "value": ["/healthz"]}
How to obtain or enter: Construct based on real data fields, matching operators, and actual values.
filters[*].name string Required non-empty field name; it will be rejected if it contains backticks. A successful save does not guarantee that the field exists; verify the data.
Example: path
How to obtain or enter: Obtain the real field name from the data details or field list for the corresponding type; do not use display aliases.
filters[*].condition string Only and/or are recommended; the connector of the first condition is ignored. The current lenient validation does not guarantee that all invalid logic is rejected; clients should enforce their own constraints.
Example: and
How to obtain or enter: If the previous condition at the same level has an AND relationship, enter and; for an OR relationship, enter or.
filters[*].operation string It is recommended to explicitly specify the operator string; see the notes for the compatible op field. For the value semantics of different operators, see the description.
Example: =
How to obtain or enter: Choose from the operator descriptions on this page, such as =, in, match, regexp, or exist.
filters[*].op string Legacy alias of operation; if both are provided, operation takes precedence; using operation consistently is recommended.
Example: =
How to obtain or enter: You can use op when compatible with historical condition structures.
filters[*].value JSON A non-empty array is recommended. =, !=, comparison, regexp/wildcard, etc. are handled according to the rules of each operator; = and comparisons take only the first value, while in/match support multiple values. Do not use null or an empty array.
Example: ["/healthz"]
How to obtain or enter: Enter real field values; for numeric conditions, it is recommended to use JSON numbers directly, and use strings for text.
filters[*].value[*] string or number A single condition value. Do not write unverified unit conversions; "0" may be converted to 0 when the numeric type is confirmed, while the saved filters still retain the original input.
Example: /healthz
How to obtain or enter: Use real field values; use numeric types for numeric fields, with units consistent with the original field.
filters[*].filters array Optional nested group; recursion uses the same structure. The current check_filters also requires a group to have non-empty name/condition/value; a common group with only condition+filters may return 406. For normal calls, prefer flat leaf conditions; validate complex groups before saving.
Example: [{"name": "env", "condition": "and", "operation": "=", "value": ["production"]}]
How to obtain or enter: For nested conditions, prefer obtaining them from a verified console configuration or an existing export.
name string Y Fill in according to the modification declaration; it is recommended to be non-empty and ≤48 characters to match the storage column. Names of non-deleted rules in the same workspace must be unique, and disabled rules also occupy names.
null allowed: False
Empty string allowed: False
Max length: 50
Example: Ignore health check logs
How to obtain or enter: Name it according to business needs; first check whether a rule with the same name already exists in the workspace in the blacklist list.
desc string Optional description; the modification declaration allows up to 256 characters; omitting it or passing an empty string clears the original description.
null allowed: False
Empty string allowed: True
Max length: 256
Example: Filter production nginx health check requests.
How to obtain or enter: Fill in the rule purpose and expected impact.
type string Y Data category, not rule status. The mapping determines the meaning of source; unsupported types may return DataSourceMismatch, and the declaration text is not an enumeration validation.
null allowed: False
Example: logging
How to obtain or enter: Common categories are logging/object/custom_object/keyevent/tracing/rum/network/security/profiling/metric; the current mapping also recognizes lineage/object_history/billing/dialtest/llm/agent_monitor, which require support from the target data pipeline itself.
source string A single source; use re(.*) for all sources; if sources is non-empty, it takes precedence. If omitted in this request, it is an empty string and overwrites the old value. Do not pass null; verify the actual source.
null allowed: True
Empty string allowed: False
$maxCharacterLength: 128
Example: nginx
How to obtain or enter: Obtain from the real data source of the corresponding category; for logging it is source, for object/custom_object it is class, for tracing/profiling it is service, for rum it is app_id, for security it is category, for metric it is measurement, for object_history it is also class, and for the remaining listed categories it is source.
sources array An array of multiple exact source names; if non-empty, they are combined with IN and take precedence over source; [] falls back to source. If omitted in this request, [] is used and the old array is cleared. Do not pass null or non-string elements.
null allowed: True
Example: []
How to obtain or enter: Collect from actual source names of the same category; do not mix in service/app_id from other categories.
filters array Condition array, combined with the source condition using AND; if omitted, empty conditions overwrite the old conditions. Empty sources and empty conditions may generate {} with no scope restriction; it is recommended to explicitly submit a valid filter scope.
null allowed: True
Example: [{"name": "path", "condition": "and", "operation": "=", "value": ["/healthz"]}]
How to obtain or enter: Construct with real data fields; refer to field names and types in data details or field management.

Request Example

curl --request POST 'https://openapi.guance.com/api/v1/blacklist/blist_example/modify' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"Ignore health check logs","desc":"Filter production nginx health check requests.","type":"logging","source":"nginx","sources":[],"filters":[{"name":"path","condition":"and","operation":"=","value":["/healthz"]}]}'

Response

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

Field Type Description
content.id integer Database ID of the existing blacklist rule; use uuid when calling.
content.uuid string blist_ rule UUID.
content.workspaceUUID string UUID of the workspace it belongs to.
content.name string Rule name.
content.desc string Rule description.
content.type string Data category.
content.source string Saved single-source/all-source expression, which may be empty.
content.sources array<string> Saved multiple source names; takes precedence when non-empty.
content.sources[] string A single source name.
content.filters array<object> or object or null Original condition array; historical records may also be {} or null.
content.filters[].name string Leaf field name or historical group placeholder name.
content.filters[].condition string Connector at the same level.
content.filters[].operation string Operator; historical items may use op and omit this field.
content.filters[].op string Historical operator alias; may be omitted.
content.filters[].value JSON Saved value or value array.
content.filters[].value[] JSON A single original value.
content.filters[].filters array<object> Nested condition group; may be omitted; recursively uses the same condition structure.
content.conditions string Condition expression generated for filter execution; check this field for numeric conversion results; it is not written back directly.
content.status integer 0 enabled, 2 disabled, 3 deleted; queries for non-deleted rules include disabled rules.
content.creator string Creator identity UUID.
content.updator string Updater identity; may be empty.
content.createAt integer Creation Unix time in seconds.
content.updateAt integer Last update Unix time in seconds; -1 if not updated.
content.deleteAt integer Soft deletion Unix time in seconds; -1 if not deleted.
content.declaration object or null Workspace common declaration attached to a non-empty business object; may be null or an empty object when not configured.
{
  "code": 200,
  "content": {
    "id": 10,
    "uuid": "blist_example",
    "workspaceUUID": "wksp_example",
    "name": "Ignore health check logs",
    "desc": "Filter production nginx health check requests.",
    "type": "logging",
    "source": "nginx",
    "sources": [],
    "filters": [
      {
        "name": "path",
        "condition": "and",
        "operation": "=",
        "value": [
          "/healthz"
        ]
      }
    ],
    "conditions": "{ `source` =  'nginx'  and (`path` =  '/healthz' )}",
    "status": 0,
    "creator": "wsak_example",
    "updator": "wsak_example",
    "createAt": 1785427200,
    "updateAt": 1785427300,
    "deleteAt": -1,
    "declaration": {}
  },
  "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 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 Request JSON syntax is invalid Request JSON format error Correct the JSON according to content.reason, line, and column.
400 ft.JsonFormatError Top level of JSON is not an object Some JSON file format error Submit a JSON object as described in the parameter table.
400 ft.NameRepeat Name of a non-deleted rule in the same workspace is duplicated; disabled rules are also checked Name already exists Use a unique name or modify an existing rule.
404 ft.AlreadyExistsSameSourceAndConditions A rule of the same type in the same workspace already has exactly the same generated conditions, including disabled rules The blacklist rule already exists; please adjust it accordingly Read the current and conflicting rules, adjust the conditions or source for this request, and modify by the original UUID instead of creating a duplicate; the error HTTP status is 404.
406 ft.DataSourceMismatch type cannot be mapped to a supported data category Data source mismatch Use a data category supported by the target site and verify the spelling.
406 ft.InvalidOperationSymbol Condition operator is not in the supported set Invalid operator {} Use the operator table on this page.
400 ft.SpecialCharactersExist Condition field name contains backticks Special characters exist on the left side of the operator Use the original field name and remove any manually added backticks.
500 ft.InternalServerError Database, storage length/null, field shape, or subsequent processing exception Internal error Query the rule and its configuration first, then decide whether to retry; if it continues to fail, retain traceId.
404 ft.InvalidBlacklistuuid The specified non-deleted rule was not found in the current workspace Blacklist does not exist Recheck the UUID and workspace.
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 the permissions required for the operations on this page. For actual feature availability, verify it against the site configuration.

Feedback

Is this page helpful?