Skip to content

Get Index Key Fields



GET /api/v1/workspace/index_key_field/get

Overview

Reads the key field display configuration of Log Indexes, including the default index and clone indexes.

Before You Call and Usage Steps

The workspace is determined by the API Key. Use a Key with Log Index/Explorer management permissions. The key field configuration controls log display and optional acceleration, and does not modify actual log field names, historical log values, or unit descriptions. The index UUID and index name cannot be used interchangeably.

After reading content.cfgList, use cfg_uuid to backfill uuid in the key field modification request, and use name to backfill index in the field acceleration request. Externally bound storage indexes are not included in this list. Even if the default index has no persistent configuration yet, it returns default and empty fields; this does not mean that this GET saved a new configuration. Historical default configuration layouts are read in a compatible manner. This API does not return the global syncKeywordSpeed switch, nor does it query the completion progress of acceleration tasks; before making changes, the workspace administrator must determine the global synchronization policy.

Request Headers

Parameter Type Required Description
DF-API-KEY string Y OpenAPI authentication credential for the workspace.
Example: <DF-API-KEY>
How to obtain or enter: Obtain an OpenAPI Key with the permission for this operation from API Key management in the target workspace.

Request Example

curl --get 'https://openapi.truewatch.com/api/v1/workspace/index_key_field/get' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Response

HTTP 200, application/json. The example below shows the main fields that can be read directly.

Field Type Description
content.cfgList array<object> The default index is the first item, followed by indexes in the current workspace that are not deleted and not externally bound, including clone indexes; no pagination.
content.cfgList[*].cfg_uuid string The default item is fixed as default; others are index configuration UUIDs. When modifying, map it to cfgList[*].uuid; note that the field names are different.
content.cfgList[*].name string Log Index name, used for index in the field acceleration request.
content.cfgList[*].extendFields array<object> or historical JSON value Current key field array; defaults to []. Historical values may not be fully normalized; determine based on the actual structure, and verify abnormal values before modifying.
content.cfgList[*].extendFields[*].tag string Actual field name, not the display alias.
content.cfgList[*].extendFields[*].alias string Optional display alias; may be omitted or empty.
content.declaration object or null Workspace public declaration for non-empty business objects; when not configured, it may be null or an empty object; it is not attached to empty business objects.
{
  "code": 200,
  "content": {
    "cfgList": [
      {
        "cfg_uuid": "default",
        "name": "default",
        "extendFields": [
          {
            "tag": "host",
            "alias": "Host"
          },
          {
            "tag": "service",
            "alias": "Service"
          }
        ]
      }
    ],
    "declaration": {}
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE"
}

Error Response

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

HTTP Status errorCode Trigger Condition Message or Response Description Handling
500 ft.InternalServerError Failed to read configuration or process historical configuration data Internal error Retain the traceId and contact the administrator to verify the configuration; read again after it is fixed.