콘텐츠로 이동

통합 카탈로그 엔터티 생성



POST /api/v1/unified_catalog/entity/create

개요

통합 카탈로그 엔터티를 생성합니다.

Body 요청 매개변수

매개변수명 유형 필수 설명
entityType string Y 엔터티 유형 코드
null 허용: False
예시: database
name string Y 엔터티 이름
null 허용: False
예시: demo
attributes json 엔터티 속성 객체
null 허용: False
예시: {'project': 'demo', 'env': 'prod', 'custom_tags': ['mysql']}
telemetrySelectors array 연결 조회 정보 구성
null 허용: False

매개변수 추가 설명

요청 매개변수 설명

매개변수명 type 필수 설명
entityType string 엔터티 유형 코드
name string 엔터티 이름
attributes json 아니요 엔터티 속성 객체
telemetrySelectors array 아니요 엔터티 연결 조회 구성

attributes 공통 확장 필드 설명

필드명 type 설명
depends_on array[string] 종속 관계, 저장 시 links로 변환됩니다
component_of array[string] 소속 관계, 저장 시 contains로 변환되며, 방향은 parent/system -> 현재 엔터티입니다
components array[json/string] 구성 엔터티 목록, 저장 시 contains로 변환되며, 방향은 현재 엔터티 -> component입니다
custom_tags array/string 사용자 정의 태그, 태그가 없으면 자동으로 생성됩니다
owner string/array 팀 이름, 백엔드에서 팀 이름으로 팀 정보를 확인합니다

호출 시 주의사항

  • 관계 필드는 attributes 내에 포함하여 전달해야 하며, relations를 별도로 전달할 필요가 없습니다.
  • attributes.components는 문자열 배열 또는 entity를 포함한 객체 배열을 지원합니다. 객체의 다른 필드는 엔터티 attributes에 유지됩니다.
  • custom_tags를 전달하는 경우 태그 이름 배열을 사용하는 것이 좋습니다.

요청 예시

curl 'https://openapi.guance.com/api/v1/unified_catalog/entity/create' \
-H 'DF-API-KEY: <DF-API-KEY>' \
-H 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{"entityType":"system","name":"core","attributes":{"project":"demo","env":"prod","components":[{"entity":"service:kodo-inner","health_impact_mode":"inherit"}]},"telemetrySelectors":[]}'

응답

{
    "code": 200,
    "content": {
        "urn": "urn:mysql:default:demo"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-XXXX"
}

문서 평가

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