콘텐츠로 이동

로그 Schema 정보 가져오기



GET /api/v1/metric_info/log/schema

개요

로그 인덱스 이름을 기준으로 해당 Schema 정보를 가져옵니다 (로그 전용 API로, 필드 구조는 시계열 데이터와 일치하며 각 필드는 자체 tags 정보를 포함합니다).

Query 요청 매개변수

매개변수명 유형 필수 설명
index string 로그 인덱스 이름, 미지정 시 기본값 default 사용
비어 있음 허용: True

매개변수 추가 설명

SHOW_LOGGING_FIELD(index='인덱스명') 함수를 통해 로그 인덱스의 schema 정보를 가져옵니다.

  • index 미지정 시 기본값 default 사용
  • 다른 인덱스 지정 시 index는 전달된 로그 인덱스 이름 사용

요청 예시

curl -k 'https://openapi.guance.com/api/v1/metric_info/log/schema?index=dbindex' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--compressed

응답

{
    "code": 200,
    "content": {
        "declaration": {
            "business": "",
            "organization": "663dbba102482200070bbb02"
        },
        "fields": [
            {
                "description": "",
                "name": "__truncated_id",
                "type": "text",
                "value_type": "keyword"
            },
            {
                "description": "",
                "name": "container_name",
                "type": "text",
                "value_type": "keyword"
            },
            {
                "description": "",
                "name": "create_time",
                "type": "text",
                "value_type": "long"
            },
            {
                "description": "",
                "name": "image",
                "type": "text",
                "value_type": "keyword"
            },
            {
                "description": "",
                "name": "index",
                "type": "text",
                "value_type": "keyword"
            }
        ],
        "index": "dbindex"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "69ba6c7800000000f308c58b1256a04b"
}

문서 평가

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