跳转至

获取指标 Tags 信息



GET /api/v1/metric_info/measurement/tags

概述

根据指标集获取 Tags 信息,包含 Tag 的含义、单位等说明信息

Query 请求参数

参数名 类型 必选 说明
measurement string Y 指标集名称
允许为空: False
tag string Y 具体 tag 名称,获取该 tag 的值列表
允许为空: False
limit integer 限制返回 tag 值数量,默认10,最大不超过10
允许为空: True
$default: 10

参数补充说明

通过 show_tag_value 函数获取指定 tag 的值列表,最多返回 10 个值

请求例子

curl -k 'https://openapi.guance.com/api/v1/metric_info/measurement/tags?measurement=cpu&tag=region&limit=10' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--compressed

响应

{
    "code": 200,
    "content": {
        "declaration": {
            "business": "",
            "organization": "663dbba102482200070bbb02"
        },
        "measurement": "cpu",
        "tag": "region",
        "values": [
            "cn-shanghai"
        ]
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "69ba6c7800000000d4c313ee09f9e220"
} 

文档评价

文档内容是否对您有帮助? ×