跳转至

获取日志索引 Tags 信息



GET /api/v1/metric_info/log/tags

概述

根据日志索引名和 tag 名获取 tag 值列表,最多返回 10 个值

Query 请求参数

参数名 类型 必选 说明
index string Y 日志索引名称
允许为空: False
tag string Y tag 名称
允许为空: False
limit integer 限制返回 tag 值数量,默认10,最大不超过10
允许为空: True
$default: 10

参数补充说明

通过 field_values 函数获取日志索引的 tag 值列表

请求例子

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

响应

{
    "code": 200,
    "content": {
        "declaration": {
            "business": "",
            "organization": "663dbba102482200070bbb02"
        },
        "index": "dbindex",
        "tag": "service",
        "values": [
            "nginx"
        ]
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "69ba6c7800000000c4f4db59bf59af99"
} 

文档评价

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