Skip to content

Get Log Index List



GET /api/v1/log_index_cfg/list

Overview

Lists the log index configurations of a workspace, filterable by index type and name.

Prerequisites and Usage Steps

Queries the log indexes of the current workspace, or log indexes that have been authorized to the current workspace. This is a read-only call that does not create or modify indexes.

  1. Obtain a key from API Key Management of the target workspace. To query the current workspace, omit targetWorkspaceUUID; for cross-workspace queries, the authorizing party provides the workspace UUID, and a UUID alone cannot bypass authorization. Passing * does not automatically include the current workspace; if you need the current workspace, omit this parameter or explicitly pass the current UUID.
  2. First choose the response shape: if no pagination parameters are passed, records are located in content[]; if both pageIndex and pageSize are passed, records are located in content.data[] and pagination information is located in the top-level pageInfo. Passing only one of them does not enable pagination.
  3. Combine search, queryType, isBindCustomStore, and isDirectIndex as needed; use true / false for booleans, and join multiple query types with commas.
  4. Use the returned uuid to call Get Index Details. default is the identifier of the default index; regular records use their own UUID.

Regular records are sorted by name in ascending order. The default index of the current workspace is usually placed at the end, and when a target workspace is explicitly specified, it is usually placed at the beginning. Records with the same name across workspaces may be merged, so this is not a total count of cross-workspace index configurations. When the result is empty, stop paging; this does not mean the workspace has no indexes configured — also check the filter conditions and the authorization scope.

When queryType is explicitly used, results are also filtered by the data access rules of the key. Being able to list index configurations does not mean you have full data query permissions; actual queries are still validated by the query API.

Request Headers

Parameter 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 fill in: Obtain the complete credential from API Key Management of the current workspace.

Query Request Parameters

Parameter Type Required Description
targetWorkspaceUUID string Omit to query the current workspace; a specific UUID queries the log indexes of that workspace that have been authorized to the current workspace; * queries only the valid authorized workspaces of the current site and does not automatically include the current workspace. The returned results are limited by the authorized indexes; when queryType is explicitly used, results are also filtered by the data access rules of the current key.
Example: wksp_example
How to obtain or fill in: To query the current workspace, this can be omitted; for a cross-workspace UUID, the authorizing party provides it from its workspace information, and log data authorization must be completed first.
isBindCustomStore boolean Whether to query only indexes bound to custom storage: true for bound, false for regular managed indexes; omit to apply no filtering.
Example: false
How to obtain or fill in: Use true to list indexes bound to custom storage, and false to list regular indexes.
queryType commaArray logging is the query type for built-in logs and most non-SLS logs; standard is for SLS time series queries; query is for SLS log queries. The actual queryType of the target record takes precedence, and multiple values are joined with commas. The default index may be returned only when the filter values include logging.
Example: logging,standard
How to obtain or fill in: You can omit this parameter first, read the queryType of the returned records, and then filter as needed; use multiple values such as logging,standard.
isDirectIndex boolean Whether to query only native direct-write indexes: true for direct-write, false for non-direct-write; omit to apply no filtering.
Example: false
How to obtain or fill in: Enter true or false depending on whether you want to query native direct-write indexes.
search string Case-insensitive name contains match.
Empty string allowed: True
Example: access
How to obtain or fill in: Enter the log index name or part of it.
orderBy string The sort field only supports name, and the default is ascending by name.
Allowed values: ['name']
Example: name
How to obtain or fill in: Omit it or pass name.
pageIndex integer Page number, starting from 1; must be passed together with pageSize to enable pagination.
$minValue: 1
Example: 1
How to obtain or fill in: When enabling pagination, pass it together with pageSize, starting from 1.
pageSize integer 1 to 100 records per page; must be passed together with pageIndex to enable pagination.
$minValue: 1
$maxValue: 100
Example: 20
How to obtain or fill in: When enabling pagination, pass it together with pageIndex.

Additional Parameter Notes

The resource identifiers in the examples are placeholders; replace them with the actual values of the target workspace.

Request Example

Not paginated: records are in the content array.

curl --get 'https://openapi.guance.com/api/v1/log_index_cfg/list' \
  -H 'DF-API-KEY: <DF-API-KEY>'

Paginated with filtering: records are in content.data, and pagination is at the top-level pageInfo.

curl --get 'https://openapi.guance.com/api/v1/log_index_cfg/list' \
  -H 'DF-API-KEY: <DF-API-KEY>' \
  --data-urlencode 'queryType=logging,standard' \
  --data-urlencode 'pageIndex=1' \
  --data-urlencode 'pageSize=20'

Response

HTTP 200, application/json. First choose the record path based on whether all pagination parameters are passed; do not assume that content is always an array or always an object. The default index is a synthesized record and may have fewer fields than a regular index; the fields marked "regular record" below may be omitted.

Field Type Description
content object or array<object> When not paginated, an array of indexes; when paginated, an object containing data.
content.data array<object> Index records when paginated.
content[].uuid or content.data[].uuid string Index configuration identifier. Use regular entries to get index details; the default index uses default.
content[].name or content.data[].name string Log index name.
content[].workspaceUUID or content.data[].workspaceUUID string Workspace to which the index belongs.
content[].duration or content.data[].duration string Log retention duration, for example 14d; may be empty for indexes bound to external storage.
content[].isBindCustomStore or content.data[].isBindCustomStore integer or boolean 1 for bound to external storage, 0 for a regular managed index; the default row may return false.
content[].queryType or content.data[].queryType string Query types supported by the index.
content[].directIndex or content.data[].directIndex integer Native direct-write flag for regular indexes, 1 means yes and 0 means no. May be omitted for the default index.
content[].sortNo or content.data[].sortNo string or integer Value used for sorting in the index configuration; may be -1 for the default index.
content[].storeType or content.data[].storeType string Storage type associated with the index; may be omitted for the default index.
content.declaration object or null Workspace declaration when paginated; when not paginated, it may appear on a single record.
content.cloneTotal integer Number of cloned index records attached to some paginated results for the current workspace; may not be filtered by the current filter conditions.
content.physicalTotal integer Number of undeleted index configuration records attached to some paginated results for the current workspace, including cloned configurations; it is not equal to the number of items on this page, and the default synthesized record is not counted.
content[].id or content.data[].id integer Numeric identifier of a regular record; subsequent APIs use uuid.
content[].sourceIndexUUID or content.data[].sourceIndexUUID string UUID of the source index of a clone; an empty string indicates a regular source index.
content[].desc or content.data[].desc string Index description.
content[].conditions or content.data[].conditions string Filter conditions of the index; usually an empty string for the default index.
content[].status or content.data[].status integer Record status: 0 normal, 2 disabled; this API does not return deleted records.
content[].isFullLineIndex or content.data[].isFullLineIndex integer Whether full-line index is enabled, 1 enabled and 0 disabled.
content[].exterStoreProject or content.data[].exterStoreProject string Project or parent container name when bound to external storage; may be empty for regular indexes.
content[].exterStoreName or content.data[].exterStoreName string Name of the mapped external storage; may be empty for regular indexes.
content[].externalResourceAccessCfgUUID or content.data[].externalResourceAccessCfgUUID string UUID of the associated external resource access configuration, not an access key.
content[].region or content.data[].region string Region of the external storage; may be empty for regular indexes.
content[].isPublicNetworkAccess or content.data[].isPublicNetworkAccess integer Whether external storage access uses the public network, 1 yes and 0 no.
content[].setting or content.data[].setting object or null Index settings; the structure varies with the storage type. To modify, first read the index details and use the corresponding create or modify API.
content[].extend or content.data[].extend object or null Index extension configuration; fields are defined by the corresponding index feature and may be an empty object when not configured.
content[].storagePolicy or content.data[].storagePolicy object or null Storage policy of the index; the default index follows the workspace log policy.
content[].workspaceName or content.data[].workspaceName string or null Display name of the workspace to which the index belongs.
content[].workspaceStatus or content.data[].workspaceStatus integer Status of the workspace to which the index belongs; when present, the field identifies the workspace status and does not replace authorization checks.
content[].regionCode or content.data[].regionCode string Site/region identifier of the index, not the region field of external storage.
content[].regionName or content.data[].regionName string or null Display name of the site/region.
content[].creator or content.data[].creator string Identifier of the creator of a regular record; may be an account or an API Key.
content[].updator or content.data[].updator string Identifier of the last updater of a regular record.
content[].createAt or content.data[].createAt integer Creation time of a regular record, in Unix seconds.
content[].updateAt or content.data[].updateAt integer Last update time of a regular record, in Unix seconds.
content[].deleteAt or content.data[].deleteAt integer Deletion time of a regular record; usually -1 if not deleted.
content[].creatorInfo or content.data[].creatorInfo object Creator summary of a regular record; an empty object if it cannot be obtained.
content[].updatorInfo or content.data[].updatorInfo object Updater summary of a regular record; an empty object if it cannot be obtained.
content[].creatorInfo.uuid or content.data[].creatorInfo.uuid string Subject UUID. Returned only for regular records when subject information exists.
content[].creatorInfo.status or content.data[].creatorInfo.status integer Status of the subject account or key. Returned only for regular records when subject information exists.
content[].creatorInfo.wsAccountStatus or content.data[].creatorInfo.wsAccountStatus integer Association status of the subject in the current workspace; may be 3 when no association exists. Returned only for regular records when subject information exists.
content[].creatorInfo.username or content.data[].creatorInfo.username string or null Login name or key name; may be empty for system subjects. Returned only for regular records when subject information exists.
content[].creatorInfo.name or content.data[].creatorInfo.name string or null Display name of the subject. Returned only for regular records when subject information exists.
content[].creatorInfo.iconUrl or content.data[].creatorInfo.iconUrl string Avatar URL; an empty string if not configured, and may be omitted for system subjects. Returned only for regular records when subject information exists.
content[].creatorInfo.email or content.data[].creatorInfo.email string or null Usually an email address for accounts; for keys it may be the key UUID, and for system subjects it may be the system name, so it is not guaranteed to be a deliverable email address. Returned only for regular records when subject information exists.
content[].creatorInfo.mobile or content.data[].creatorInfo.mobile string or null Mobile phone number of the subject; may be empty if not configured. Returned only for regular records when subject information exists.
content[].creatorInfo.countryCode or content.data[].creatorInfo.countryCode string Country/region code of the mobile phone number; empty if not configured, and may be omitted for system subjects. Returned only for regular records when subject information exists.
content[].creatorInfo.acntWsNickname or content.data[].creatorInfo.acntWsNickname string Nickname in the current workspace; empty if not configured, and may be omitted for system subjects. Returned only for regular records when subject information exists.
content[].updatorInfo.uuid or content.data[].updatorInfo.uuid string Subject UUID. Returned only for regular records when subject information exists.
content[].updatorInfo.status or content.data[].updatorInfo.status integer Status of the subject account or key. Returned only for regular records when subject information exists.
content[].updatorInfo.wsAccountStatus or content.data[].updatorInfo.wsAccountStatus integer Association status of the subject in the current workspace; may be 3 when no association exists. Returned only for regular records when subject information exists.
content[].updatorInfo.username or content.data[].updatorInfo.username string or null Login name or key name; may be empty for system subjects. Returned only for regular records when subject information exists.
content[].updatorInfo.name or content.data[].updatorInfo.name string or null Display name of the subject. Returned only for regular records when subject information exists.
content[].updatorInfo.iconUrl or content.data[].updatorInfo.iconUrl string Avatar URL; an empty string if not configured, and may be omitted for system subjects. Returned only for regular records when subject information exists.
content[].updatorInfo.email or content.data[].updatorInfo.email string or null Usually an email address for accounts; for keys it may be the key UUID, and for system subjects it may be the system name, so it is not guaranteed to be a deliverable email address. Returned only for regular records when subject information exists.
content[].updatorInfo.mobile or content.data[].updatorInfo.mobile string or null Mobile phone number of the subject; may be empty if not configured. Returned only for regular records when subject information exists.
content[].updatorInfo.countryCode or content.data[].updatorInfo.countryCode string Country/region code of the mobile phone number; empty if not configured, and may be omitted for system subjects. Returned only for regular records when subject information exists.
content[].updatorInfo.acntWsNickname or content.data[].updatorInfo.acntWsNickname string Nickname in the current workspace; empty if not configured, and may be omitted for system subjects. Returned only for regular records when subject information exists.
pageInfo object The outer pagination object of the paginated result.
pageInfo.pageIndex integer Current page number.
pageInfo.pageSize integer Number of records per page.
pageInfo.count integer Number of records on this page.
pageInfo.totalCount integer Total number of visible records that match the conditions.
{
  "code": 200,
  "content": {
    "data": [
      {
        "uuid": "default",
        "name": "default",
        "workspaceUUID": "wksp_example",
        "workspaceName": "Example Workspace",
        "workspaceStatus": 0,
        "status": 0,
        "conditions": "",
        "duration": "14d",
        "isBindCustomStore": false,
        "isFullLineIndex": 0,
        "queryType": "logging",
        "storagePolicy": {},
        "sortNo": -1,
        "extend": {},
        "regionCode": "example-region",
        "regionName": "Example Region"
      }
    ],
    "declaration": null,
    "cloneTotal": 0,
    "physicalTotal": 0
  },
  "errorCode": "",
  "message": "",
  "success": true,
  "traceId": "TRACE-EXAMPLE",
  "pageInfo": {
    "pageIndex": 1,
    "pageSize": 20,
    "count": 1,
    "totalCount": 1
  }
}

Response example for a non-paginated request (the current workspace has only the default index):

{
  "code": 200,
  "content": [
    {
      "uuid": "default",
      "name": "default",
      "workspaceUUID": "wksp_example",
      "workspaceName": "Example Workspace",
      "workspaceStatus": 0,
      "status": 0,
      "conditions": "",
      "duration": "14d",
      "isBindCustomStore": false,
      "isFullLineIndex": 0,
      "queryType": "logging",
      "storagePolicy": {},
      "sortNo": -1,
      "extend": {},
      "regionCode": "example-region",
      "regionName": "Example Region",
      "declaration": null
    }
  ],
  "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 Resolution
406 ft.ParameterValidationFailed The page index/page size is out of the allowed range, orderBy is not name, or an undeclared Query parameter is passed Request field validation failed. Check the field indicated in message; for pagination, use pageIndex ≥ 1 and pageSize from 1 to 100; do not add cursor or targetRegion parameters from other APIs directly to this API.

Feedback

Is this page helpful?