메저먼트 스키마 정보 조회¶
GET /api/v1/metric_info/measurement/schema
개요¶
메저먼트 이름을 기준으로 해당 스키마 정보(fields 및 tags 정보 포함)를 조회합니다.
Query 요청 매개변수¶
| 매개변수명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| measurement | string | Y | 메저먼트 이름 비어 있음 허용: False |
매개변수 추가 설명¶
메저먼트의 스키마 정보(필드 목록, 필드 유형, 단위, 설명 등)를 조회합니다.
- API는 항상 완전한
fields를 반환합니다. - 각
field.tags는get_metric_field_tags_info()를 통해 가져오며, 해당 캐시 기능을 재사용합니다. - 쿼리 시간 범위는 워크스페이스 시간대의 당일
0시부터24시까지로 통일하여 캐시 적중률을 높입니다. - 따라서 이 API는 항상 전체
fields를 반환하며,field.tags는 현재 쿼리 결과 또는 캐시 결과에서 직접 가져옵니다.
요청 예시¶
curl -k 'https://openapi.guance.com/api/v1/metric_info/measurement/schema?measurement=cpu' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--compressed
응답¶
{
"code": 200,
"content": {
"declaration": {
"business": "",
"organization": "663dbba102482200070bbb02"
},
"fields": [
{
"description": "",
"name": "load5s",
"tags": [
{
"description": "",
"name": "region"
},
{
"description": "",
"name": "cpu"
},
{
"description": "",
"name": "host"
},
{
"description": "",
"name": "zone_id"
}
],
"type": "gauge",
"unit": "",
"value_type": "float"
},
{
"description": "",
"name": "usage_guest",
"tags": [
{
"description": "",
"name": "region"
},
{
"description": "",
"name": "cpu"
},
{
"description": "",
"name": "host"
},
{
"description": "",
"name": "zone_id"
}
],
"type": "gauge",
"unit": "",
"value_type": "float"
}
],
"measurement": "cpu"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "69ba6c7800000000d2108e22fe3fb1dc"
}