コンテンツにスキップ

ログスキーマ情報の取得



GET /api/v1/metric_info/log/schema

概要

ログインデックス名に基づいて、そのスキーマ情報を取得します(ログ専用のインターフェースです。フィールド構造は時系列データと同一であり、各フィールドにはそれぞれのタグ情報が含まれます)。

クエリリクエストパラメータ

パラメータ名 必須 説明
index string ログインデックス名。指定しない場合はデフォルトで default が使用されます。
空を許可: True

パラメータ補足説明

SHOW_LOGGING_FIELD(index='インデックス名') 関数を使用して、ログインデックスのスキーマ情報を取得します。

  • index を指定しない場合は、デフォルトで default が使用されます。
  • 他のインデックスを指定する場合は、index にそのログインデックス名を指定します。

リクエスト例

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

レスポンス

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

フィードバック

このページは役に立ちましたか?