Skip to content

Get Index Information



GET /api/v1/log_index_cfg/{cfg_uuid}/get

Overview

Retrieve the configuration of a log index in the current workspace, with the option to return field mappings.

Before You Begin and Usage Steps

Obtain the UUID of an index in the current workspace from Log Index List. For the default index, use default. Connection configuration for bound storage is read only when needed. accessCfg may contain access credentials or reversibly encoded content and should be protected as credentials. The example shows selected commonly used fields. The calling credential requires the log.indexManage or log.externalIndexManage permission.

Route Parameters

Parameter Name Type Required Description
cfg_uuid string Y UUID of the target log index configuration; you can also enter default.
Example: default
How to obtain or enter: Obtain it from content[].uuid in the Log Index List or content.data[].uuid in paginated results; use only an index in the current workspace.

Request Headers

Parameter Name Type Required Description
DF-API-KEY string Y Workspace calling credential. The record UUID and the calling credential are different fields.
Example: <DF-API-KEY>
How to obtain or enter: Obtain the full credential from API Key Management in the current workspace.

Query Request Parameters

Parameter Name Type Required Description
isShowAccessCfg boolean Whether to return accessCfg; default false.
Example: false
How to obtain or enter: Pass true only when connection configuration is actually needed.
isShowFields boolean Whether to return field mappings; default false.
Example: true
How to obtain or enter: Pass true when you need to understand the mappings of queryable fields.

Additional Parameter Notes

Resource identifiers in the examples are placeholders. Replace them with actual values for the target workspace.

Request Example

curl --get -H "DF-API-KEY: <DF-API-KEY>" \
  'https://openapi.guance.com/api/v1/log_index_cfg/default/get' \
  --data-urlencode "isShowFields=true"

Response

HTTP 200, application/json.

Field Type Description
content.uuid string Index configuration identifier. Regular rows are used to obtain index details; the default index uses default.
content.name string Log index name.
content.workspaceUUID string Workspace to which the index belongs.
content.duration string Log retention duration, for example 14d; may be empty for an index bound to external storage.
content.isBindCustomStore integer or boolean 1 for bound external storage, 0 for a regular managed index; the default row may return false.
content.queryType string Query types supported by the index.
content.directIndex integer Native direct-write flag for a regular index; 1 means yes, 0 means no. May be omitted for the default index.
content.sortNo string or integer Value used for sorting in the index configuration; may be -1 for the default index.
content.storeType string Storage type associated with the index; may be omitted for the default index.
content.accessCfg object Returned only when isShowAccessCfg=true; may contain storage access credentials.
content.fields array<object> Mapping list returned only when isShowFields=true; the default index may have no fields.
content.fields[].field string Field name used for queries.
content.fields[].originalField string Field name in the source storage.
content.cloneConfig object or null Configuration of a cloned index; may be empty for a regular index.
content.sourceIndexName string Name of the source index associated with the cloned index.
content.regionInfo object Storage region or authorization information; {} for the default index.
content.declaration object or null Workspace declaration.
{
  "code": 200,
  "content": {
    "uuid": "default",
    "name": "default",
    "workspaceUUID": "wksp_example",
    "duration": "14d",
    "isBindCustomStore": false,
    "queryType": "logging",
    "sortNo": -1,
    "declaration": null,
    "regionInfo": {},
    "fields": []
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Responses

For authentication, rate limiting, and common request errors, see Common Error Definitions.

HTTP Status errorCode Trigger Condition Message or Response Description Resolution
406 ft.ParameterValidationFailed An undeclared parameter is passed, or a parameter value fails validation. Parameter validation failed; the message indicates the invalid field. Check the location and allowed values of each field.
404 ft.LogIndexCfgNoExists The configuration does not belong to this workspace, has been deleted, does not exist, or the source of a cloned index is no longer available. The specified log index configuration does not exist. Retrieve the index identifier again from the list in the same workspace, and check whether the clone source still exists.

Feedback

Is this page helpful?