Skip to content

Modify Default Type Index Configuration



POST /api/v1/log_index_cfg/{cfg_uuid}/modify

Overview

Modify the configuration of the default storage type index.

Route Parameters

Parameter Name Type Required Description
cfg_uuid string Y Configuration UUID

Body Request Parameters

Parameter Name Type Required Description
desc string Index description
Example: xxx
Allow empty: False
Allow empty string: True
Max length: 1024
extend json Frontend custom data
Allow empty: True
duration string Data retention duration
Allow empty: False
Example: 7d
storagePolicy json Long-term storage policy. Only supported for workspaces with log storage in scopedb; pay, enterprise, unlimited support long-term log storage. For enterprise/unlimited, logging max 1800d; for enterprise/unlimited, rp supports custom long-term storage duration (max 3600d). For unlimited, when BossAccountSet is enabled, only metric_point_total billing type is supported; otherwise, it is processed as metric_point_total. Includes longStorageEnabled and longStorageDuration.
Example: {'longStorageEnabled': True, 'longStorageDuration': '180d'}
Allow empty: False
isFullLineIndex int Whether to use full-line index; 0/false means keep message field index, 1/true means full-line index, default is 0. Only workspaces with log storage in scopedb can set to 1.
Allow empty: False
setting json Related configuration information
Allow empty: False
setting.hot_retention int Volcengine storage, standard storage - hot storage
Allow empty: False
setting.cold_retention int Volcengine storage, infrequent access storage - cold data
Allow empty: False
setting.archive_retention int Volcengine storage, archive storage - archived data
Allow empty: False

Supplemental Parameter Description

Matching conditions in extend

Parameter Name Type Required Description
matchMode String Matching mode, optional values: basic, advanced; default is basic
filters Array[dict] List of normal matching filter conditions; it is recommended to pass an empty array in advanced mode
advancedFilter Dict Advanced matching condition tree, effective when matchMode=advanced

The root node of advancedFilter is fixed as group. group.filters can contain nested rule or group. Optional values for rule.operation: =, !=, in, not_in, match, not_match, wildcard, not_wildcard, regexp, not_regexp, >, <, >=, <=, exist, not_exist. value is always an array; exist / not_exist uses an empty array. When matchMode=advanced, the backend generates conditions in DQL where style; normal filters still maintain the historical generation format.

Request Example

curl 'https://openapi.guance.com/api/v1/log_index_cfg/lgim_xxxx32/modify' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: zh' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw '{"duration":"7d","isFullLineIndex":1,"extend":{"filters":[{"condition":"and","name":"host","operation":"in","value":["guance"]}]}}' \
--compressed

Response

{
    "code": 200,
    "content": {
        "conditions": "{  `host` in [ 'guance' ] }",
        "createAt": 1698751853,
        "creator": "xxx",
        "deleteAt": -1,
        "duration": "7d",
        "extend": {
            "filters": [
                {
                    "condition": "and",
                    "name": "host",
                    "operation": "in",
                    "value": [
                        "guance"
                    ]
                }
            ]
        },
        "exterStoreName": "",
        "exterStoreProject": "",
        "externalResourceAccessCfgUUID": "",
        "id": 1376,
        "isBindCustomStore": 0,
        "isFullLineIndex": 1,
        "isPublicNetworkAccess": 0,
        "name": "test_index",
        "queryType": "logging",
        "region": "",
        "setting": {},
        "sortNo": 3,
        "status": 0,
        "storeType": "",
        "updateAt": 1698752013.27368,
        "updator": "xx",
        "uuid": "lgim_xxxx32",
        "workspaceUUID": "wksp_xxxx32"
    },
    "errorCode": "",
    "message": "",
    "success": true,
    "traceId": "TRACE-09F7E56D-1DE5-48C9-A77A-108A53462A75"
}

Feedback

Is this page helpful?