Skip to content

Modify a Blacklist



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

Overview

Modify an existing blacklist

Route Parameters

Parameter Name Type Required Description
blist_uuid string Y UUID of the blacklist rule
Allow empty: False

Body Request Parameters

Parameter Name Type Required Description
name string Y Name (Added in iteration on 2024-11-27)
Allow empty: False
Allow empty string: False
Maximum length: 50
desc string Description (Added in iteration on 2024-11-27)
Example: Description 1
Allow empty: False
Allow empty string: True
Maximum length: 256
type string Y Blacklist type, enumerated values are ('object', 'custom_object', 'logging', 'keyevent', 'tracing', 'rum', 'network', 'security', 'profiling', 'metric')
Allow empty: False
source string Data source, when all sources are used, this field is re(.*)
Allow empty: True
Allow empty string: False
Maximum character length: 128
sources array Data source, use this field for multiple sources (use source field re(.*) for all sources)
Allow empty: True
filters array Filter conditions
Allow empty: True

Additional Parameter Notes

Request Example

curl 'https://openapi.guance.com/api/v1/blacklist/blist_xxxx32/modify' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"name":"Rule 1","desc":"","type":"logging","source":"kodo-log","filters":[{"name":"hostname","value":["127.0.0.1"],"operation":"in","condition":"and"}]}' \
--compressed

Response

{
    "code": 200,
    "content": {
        "conditions": "{ source =  'kodo-log'  and ( hostname in [ '127.0.0.1' ] )}",
        "createAt": 1677653414,
        "creator": "acnt_xxxx32",
        "deleteAt": -1,
        "desc": "",
        "filters": [
            {
                "condition": "and",
                "name": "hostname",
                "operation": "in",
                "value": [
                    "127.0.0.1"
                ]
            }
        ],
        "id": 24,
        "name": "Rule 1",
        "source": "kodo-log",
        "status": 0,
        "type": "logging",
        "updateAt": 1678029845.282458,
        "updator": "xxxx",
        "uuid": "blist_xxxx32",
        "workspaceUUID": "wksp_xxxx32"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-BC365EB4-B4BA-4194-B0BB-B1AC8FA29804"
} 

Feedback

Is this page helpful? ×