Skip to content

Get Log Index Tags Information



GET /api/v1/metric_info/log/tags

Overview

Get a list of tag values based on the log index name and tag name, returning up to 10 values.

Query Request Parameters

Parameter Name Type Required Description
index string Y Log index name
Allow empty: False
tag string Y Tag name
Allow empty: False
limit integer Limit the number of returned tag values, default is 10, maximum is 10
Allow empty: True
$default: 10

Parameter Additional Information

Get the list of tag values for a log index via the field_values function.

Request Example

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

Response

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