콘텐츠로 이동

수정



POST /api/v1/data_query_rule/{query_rule_uuid}/modify

개요

단일 데이터 액세스 규칙 수정

경로 매개변수

매개변수명 유형 필수 설명
query_rule_uuid string 규칙 uuid

본문 요청 매개변수

매개변수명 유형 필수 설명
name string 이름
빈 값 허용: False
빈 문자열 허용: False
최대 길이: 64
desc string 아니요 설명
예시: 설명1
빈 값 허용: False
빈 문자열 허용: True
최대 길이: 256
indexes array 아니요 로그 유형, 이 필드는 필수, 인덱스 uuid, [""]는 전체를 의미
예시: ['
']
빈 값 허용: False
sources array 아니요 리소스 uuid, ["*"]는 전체를 의미
예시: ['appid_96357a78f84041d28b5d7aaa6201a424']
빈 값 허용: False
roleUUIDs array 역할 목록
예시: []
빈 값 허용: False
conditions string 아니요 필터 검색
예시: search
빈 값 허용: False
빈 문자열 허용: True
extend json 아니요 사용자 정의
예시: xxx
빈 값 허용: False
logic string 아니요 논리 필드
예시: or
빈 값 허용: False
maskFields string 아니요 마스킹 필드, 여러 필드는 쉼표(,)로 구분
예시: message,host
빈 값 허용: False
빈 문자열 허용: True
reExprs array 아니요 정규 표현식
예시: [{'name': 'AA', 'reExpr': 'ss', 'enable': 0}, {'name': 'BB', 'reExpr': '.*', 'enable': 1}]
빈 값 허용: False

매개변수 추가 설명

1. 요청 매개변수 설명

매개변수명 유형 필수 설명
name string 이름
desc String 아니요 설명
indexes array type이 logging인 경우 필수, 다른 워크스페이스(워크스페이스 권한 필요)의 인덱스 권한을 부여하는 경우 "워크스페이스 UUID:인덱스 UUID" 형식 사용, 예: ["wksp_111:lgim_222", "wksp_333:lgim_444"]
sources array type이 logging이 아닌 경우 필수, type이 rum인 경우 앱 appId 목록, type이 tracing인 경우 서비스명 목록, type이 metric인 경우 메저먼트 목록
roleUUIDs array 역할 UUID 목록
conditions string 아니요 실제 사용되는 데이터 범위의 필터 조건, 예: "device IN ['PC'] and session_has_replay IN ['1']"
extend dict 확장 필드, conditions의 구조적 내용 저장, 프론트엔드 페이지 표시용, 예:
logic string 아니요 논리 필드, and/or, 필터 조건 연결에 사용
maskFields string 아니요 마스킹 필드, 여러 필드는 쉼표(,)로 구분
reExprs array 아니요 정규 표현식, 예: [{"name":"1111","enable":true,"reExpr":"tkn_[\da-z]*"},{"name":"liuyltest","enable":true,"reExpr":"test"}]

요청 예시

curl 'https://openapi.guance.com/api/v1/data_query_rule/lqrl_xxx/modify' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw $'{"name":"rum test","desc":"","roleUUIDs":["role_a1e8215c25474f0bb3809f2d56749ed9","role_aa49795a5a5a4753a2a6350ab57f9497"],"indexes":[],"sources":["a2727170_7b1a_11ef_9de6_855cb2bccffb"],"extend":{"env":["front"],"province":["jiangsu"]},"maskFields":"source","logic":"and","conditions":"`env` IN [\'front\'] and `province` IN [\'jiangsu\']","reExprs":[{"name":"liuyl","reExpr":".*","enable":true}]}' \
--compressed

응답

{
    "code": 200,
    "content": {
        "conditions": "`env` IN ['front'] and `province` IN ['jiangsu']",
        "createAt": 1730532068,
        "creator": "wsak_cd83804176e24ac18a8a683260ab0746",
        "declaration": {
            "asd": "aa,bb,cc,1,True",
            "asdasd": "dawdawd",
            "business": "aaa",
            "dd": "dd",
            "fawf": "afawf",
            "organization": "64fe7b4062f74d0007b46676"
        },
        "deleteAt": -1,
        "desc": "",
        "extend": {
            "env": [
                "front"
            ],
            "province": [
                "jiangsu"
            ]
        },
        "id": 351,
        "indexes": [],
        "logic": "and",
        "maskFields": "source",
        "name": "rum test",
        "reExprs": [
            {
                "enable": true,
                "name": "liuyl",
                "reExpr": ".*"
            }
        ],
        "roleUUIDs": [
            "role_a1e8215c25474f0bb3809f2d56749ed9",
            "role_aa49795a5a5a4753a2a6350ab57f9497"
        ],
        "sources": [
            "a2727170_7b1a_11ef_9de6_855cb2bccffb"
        ],
        "status": 0,
        "type": "rum",
        "updateAt": 1730532375.5740402,
        "updator": "wsak_cd83804176e24ac18a8a683260ab0746",
        "uuid": "lqrl_dfe6330883ef4311afae5d380e2294a1",
        "workspaceUUID": "wksp_4b57c7bab38e4a2d9630f675dc20015d"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-289325B8-AA1E-4AE3-BDB8-D1BE195FB8A8"
}

문서 평가

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