All Products
Search
Document Center

Simple Log Service:GetIndex

Last Updated:Feb 04, 2026

Queries the index of a Logstore.

Operation description

Usage notes

Host consists of a project name and a Simple Log Service endpoint. You must specify a project in Host.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /logstores/{logstore}/index HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

logstore

string

Yes

The name of the Logstore.

test-logstore

Request parameters

Parameter

Type

Required

Description

Example

project

string

Yes

The name of the project.

ali-test-project

Response elements

Element

Type

Description

Example

object

The information about the index.

ttl

integer

The lifecycle of the index file. Valid values: 7, 30, and 90. Unit: day.

30

max_text_len

integer

The maximum length of a field value that can be retained. Default value: 2048. Unit: bytes. The default value is equal to 2 KB. You can change the value of the max_text_len parameter. Valid values: 64 to 16384. Unit: bytes.

2048

log_reduce_white_list

array

The fields in the whitelist that are used to cluster logs. This parameter is valid only if the log clustering feature is enabled.

string

The field in the whitelist.

a

log_reduce_black_list

array

The fields in the blacklist that are used to cluster logs. This parameter is valid only if the log clustering feature is enabled.

string

The field in the blacklist.

b

line

object

The configurations of full-text indexes.

chn

boolean

Indicates whether Chinese characters are included. Valid values:

  • true

  • false

false

caseSensitive

boolean

Indicates whether case sensitivity is enabled. Valid values:

  • true

  • false

false

token

array

The delimiters.

string

The delimiter. Examples: ",", ".", "\r", and "\n".

,

include_keys

array

The included fields.

string

The included field.

includeField

exclude_keys

array

The excluded fields.

string

The excluded field.

excludeField

keys

object

The configurations of field indexes. A field index is in the key-value format in which the key specifies the name of the field and the value specifies the index configuration of the field.

object

The configurations of the field index.

caseSensitive

boolean

Indicates whether case sensitivity is enabled. This parameter is required only when type is set to text. Valid values:

  • true

  • false

false

chn

boolean

Indicates whether Chinese characters are included. This parameter is required only when type is set to text. Valid values:

  • true

  • false

false

token

array

The delimiters.

string

The delimiter. This parameter is required only when type is set to text.

,

type

string

The data type of the field value. Valid values: text, json, double, and long.

text

doc_value

boolean

Indicates whether the analytics feature is enabled for the field. Valid values:

  • true

  • false

false

alias

string

The alias of the field.

myAlias

log_reduce

boolean

Indicates whether the log clustering feature is enabled.

false

lastModifyTime

integer

The time when the index configurations were last updated. The value is a UNIX timestamp representing the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC.

1524155379

index_mode

string

The type of the index.

v2

storage

string

The storage type. The value is fixed as pg.

pg

Examples

Success response

JSON format

{
  "ttl": 30,
  "max_text_len": 2048,
  "log_reduce_white_list": [
    "a"
  ],
  "log_reduce_black_list": [
    "b"
  ],
  "line": {
    "chn": false,
    "caseSensitive": false,
    "token": [
      ","
    ],
    "include_keys": [
      "includeField"
    ],
    "exclude_keys": [
      "excludeField"
    ]
  },
  "keys": {
    "key": {
      "caseSensitive": false,
      "chn": false,
      "token": [
        ","
      ],
      "type": "text",
      "doc_value": false,
      "alias": "myAlias"
    }
  },
  "log_reduce": false,
  "lastModifyTime": 1524155379,
  "index_mode": "v2",
  "storage": "pg"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.