Help Center/ Log Tank Service/ API Reference/ APIs/ Log Stream Management/ Querying the Index Configurations of a Specified Log Stream
Updated on 2025-08-21 GMT+08:00

Querying the Index Configurations of a Specified Log Stream

Function

This API is used to query the index configurations of a specified log stream.

Calling Method

For details, see Calling APIs.

URI

GET /v1.0/{project_id}/groups/{group_id}/stream/{stream_id}/index/config

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID.

Minimum: 32

Maximum: 32

group_id

Yes

String

Log group ID. For details about how to obtain a log group ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID.

Minimum: 36

Maximum: 36

stream_id

Yes

String

Log stream ID. For details about how to obtain a log stream ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID.

Minimum: 36

Maximum: 36

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token obtained from IAM. For details about how to obtain it, see Obtaining a User Token.

Constraints

N/A

Range

N/A

Default Value

N/A

Content-Type

Yes

String

Definition

Message body format. Set this parameter to application/json;charset=utf8.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

fullTextIndex

LTSFullTextIndexInfo object

Full-text indexing configuration.

fields

Array of LTSFieldsInfo objects

Field indexing configuration.

logStreamId

String

Log stream ID.

Table 4 LTSFullTextIndexInfo

Parameter

Type

Description

enable

Boolean

Definition

Whether to enable full-text indexing.

Constraints

N/A

Range

true: Full-text indexing is enabled.

false: Full-text indexing is disabled.

Default Value

true

caseSensitive

Boolean

Definition

Whether letters are case-sensitive when full-text indexing is enabled.

Constraints

N/A

Range

true: Letters are case-sensitive.

false: Letters are case insensitive.

Default Value

false

includeChinese

Boolean

Definition

Whether full-text indexing includes Chinese characters.

Constraints

N/A

Range

true: Chinese characters are included.

false: Chinese characters are not included.

Default Value

false

tokenizer

String

Definition

Delimiters. The log content can be split into multiple words based on the specified delimiters. If the default delimiters do not meet your requirements, use custom delimiters.

Constraints

N/A

Range

Minimum characters: 0

Maximum characters: 128

Default Value

, '";=()[]{}@&<>/:\n\t\r

ascii

Array of strings

Definition

ASCII delimiters. Enter ASCII values and characters by referring to ASCII Table.

Constraints

N/A

Range

Minimum characters: 1

Maximum characters: 3

Default Value

N/A

Table 5 LTSFieldsInfo

Parameter

Type

Description

fieldType

String

Definition

Log field type for field indexing.

Constraints

N/A

Range

  • string

  • long

  • float

  • json

Default Value

string

fieldName

String

Definition

Log field name for field indexing.

Constraints

  • Use only letters, digits, hyphens (-), underscores (_), and periods (.). Do not start or end with a period, or end with double underscores (__).

  • By default, LTS enables field indexing for some system reserved fields. For details, see section "System Reserved Fields."

Range

Field in the sample log.

Default Value

N/A

caseSensitive

Boolean

Definition

Whether to enable case sensitivity for field indexing.

Constraints

N/A

Range

  • true: case-sensitive

  • false: case-insensitive

Default Value

false

includeChinese

Boolean

Definition

Whether field indexing includes Chinese characters.

Constraints

N/A

Range

  • true: Chinese characters are included.

  • false: Chinese characters are not included.

Default Value

false

tokenizer

String

Definition

Custom delimiters.

Constraints

N/A

Range

N/A

Default Value

, '";=()[]{}@&<>/:\?\n\t\r

quickAnalysis

Boolean

Definition

Whether to enable quick analysis for field indexing.

Constraints

  • The maximum length of a field for quick analysis is 2,000 bytes.

  • The quick analysis field area displays the first 100 records.

  • true: enables quick analysis.

  • false: disables quick analysis.

Range

Default Value

true

ascii

Array of strings

Definition

ASCII delimiters.

Constraints

N/A

ltsSubFieldsInfoList

Array of LTSSubFieldsInfo objects

Definition

Field information when the field type in the field index configuration is JSON.

Constraints

N/A

fieldAnalysisAlias

String

Definition

Alias. After an alias is set, you can only use that alias for SQL search and analysis. However, it cannot be used for keyword search.

Constraints

N/A

Range

Maximum 256 characters.

Default Value

N/A

Table 6 LTSSubFieldsInfo

Parameter

Type

Description

fieldType

String

Definition

Log field type for field indexing.

Constraints

N/A

Range

  • string

  • long

  • float

Default Value

string

fieldName

String

Definition

Log field name for field indexing.

Constraints

  • Use only letters, digits, hyphens (-), underscores (_), and periods (.). Do not start or end with a period, or end with double underscores (__).

  • By default, LTS enables field indexing for some system reserved fields. For details, see section "System Reserved Fields."

Range

Field in the sample log.

Default Value

N/A

quickAnalysis

Boolean

Definition

Whether to enable quick analysis for field indexing.

Constraints

  • The maximum length of a field for quick analysis is 2,000 bytes.

  • The quick analysis field area displays the first 100 records.

  • true: enables quick analysis.

  • false: disables quick analysis.

Range

Default Value

true

fieldAnalysisAlias

String

Definition

Alias. After an alias is set, you can only use that alias for SQL search and analysis. However, it cannot be used for keyword search.

Constraints

N/A

Range

Maximum 256 characters.

Default Value

N/A

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code. For details, see Error Codes.

Range

N/A

error_msg

String

Definition

Error message.

Range

N/A

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code. For details, see Error Codes.

Range

N/A

error_msg

String

Definition

Error message.

Range

N/A

Example Requests

Query the index configurations of a specified log stream of the current tenant. The request parameter is same as the path parameter. No request example is provided.

Example Responses

Status code: 200

The request is successful and the index configuration is queried.

{
  "logStreamId" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "fullTextIndex" : {
    "ascii" : [ ],
    "tokenizer" : ", '\";=()[]{}@&<>/:\\n\\t\\r",
    "enable" : true,
    "caseSensitive" : true,
    "includeChinese" : false
  },
  "fields" : [ {
    "ascii" : [ ],
    "tokenizer" : ", '\";=()[]{}@&<>/:\\\\?\\n\\t\\r",
    "fieldName" : "field1",
    "caseSensitive" : false,
    "includeChinese" : true,
    "quickAnalysis" : true,
    "fieldType" : "string",
    "ltsSubFieldsInfoList" : null
  }, {
    "ascii" : [ ],
    "tokenizer" : ", '\";=()[]{}@&<>/:\\\\?\\n\\t\\r",
    "fieldName" : "field2",
    "caseSensitive" : false,
    "includeChinese" : true,
    "quickAnalysis" : true,
    "fieldType" : "string",
    "ltsSubFieldsInfoList" : null
  } ]
}

Status code: 400

BadRequest: The request is invalid. Modify the request based on the description in error_msg before a retry.

{
  "errorCode" : "SVCSTG.ALS.200201",
  "errorMessage" : "Query Param is error."
}

Status code: 500

InternalServerError: The server has received the request but encountered an internal error.

{
  "error_code" : "LTS.0102",
  "error_msg" : "Query empty."
}

Status Codes

Status Code

Description

200

The request is successful and the index configuration is queried.

400

BadRequest: The request is invalid. Modify the request based on the description in error_msg before a retry.

500

InternalServerError: The server has received the request but encountered an internal error.

Error Codes

See Error Codes.