Skip to content

Get Log Schema Information



GET /api/v1/metric_info/log/schema

Overview

Returns the schema information for a log index based on its name. Each field returns name, value_type, type, and description; tags is not returned.

Query Request Parameters

Parameter Type Required Description
index string Log index name. Defaults to default when not passed.
Allow empty: True

Additional Parameter Notes

The schema information for a log index is obtained through the SHOW_LOGGING_FIELD(index='索引名') function.

  • When index is not specified, default is used by default.
  • When another index is specified, index uses the passed-in log index name.

Example Request

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

Response

{
    "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"
} 

Feedback

Is this page helpful?