콘텐츠로 이동

수정



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

개요

블랙리스트 수정

라우트 파라미터

파라미터명 유형 필수 설명
blist_uuid string Y 블랙리스트 규칙 uuid
비워두기 가능: False

Body 요청 파라미터

파라미터명 유형 필수 설명
name string Y 이름 (2024-11-27 반복 추가)
비워두기 가능: False
빈 문자열 가능: False
최대 길이: 50
desc string 설명 (2024-11-27 반복 추가)
예시: 설명1
비워두기 가능: False
빈 문자열 가능: True
최대 길이: 256
type string Y 블랙리스트 유형, 열거형 값 유형: ('object', 'custom_object', 'logging', 'keyevent', 'tracing', 'rum', 'network', 'security', 'profiling', 'metric')
비워두기 가능: False
source string 데이터 소스, 전체 소스인 경우 source는 re(.*)
비워두기 가능: True
빈 문자열 가능: False
$maxCharacterLength: 128
sources array 데이터 소스, 여러 소스인 경우 이 필드 사용, 전체 소스가 아닌 경우(전체 소스는 source 필드 re(.*) 사용)
비워두기 가능: True
filters array 필터 조건
비워두기 가능: True

파라미터 추가 설명

요청 예시

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":"Rule1","desc":"","type":"logging","source":"kodo-log","filters":[{"name":"hostname","value":["127.0.0.1"],"operation":"in","condition":"and"}]}' \
--compressed

응답

{
    "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": "Rule1",
        "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"
}

문서 평가

이 페이지가 도움이 되었나요?