GetIndex

Updated at:

Queries the index information of a specified Logstore.

Operation description

Operation description

The host in the request syntax consists of the project name and the Simple Log Service endpoint. You must specify the project in the 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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

log:GetIndex

get

*LogStore

acs:log:{#regionId}:{#accountId}:project/{#project}/logstore/{#logstore}

  • log:TLSVersion
None

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 response struct.

index_mode

string

The index type.

v2

keys

object

The field index configuration. The key is the field name, and the value is the index configuration.

IndexKey

The index configuration of a single field.

lastModifyTime

integer

The last update time of the index. The value is a UNIX timestamp that represents the number of seconds that have elapsed since 00:00:00 UTC on January 1, 1970.

1524155379

line

object

The full-text index configuration.

caseSensitive

boolean

Specifies whether the index is case-sensitive. Valid values:

  • true: The index is case-sensitive.

  • false: The index is not case-sensitive.

false

chn

boolean

Specifies whether the index contains Chinese characters. Valid values:

  • true: The index contains Chinese characters.

  • false: The index does not contain Chinese characters.

false

exclude_keys

array

The list of excluded fields.

string

The excluded field.

excludeField

include_keys

array

The list of included fields.

string

The included field.

includeField

token

array

The list of delimiters.

string

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

,

log_reduce

boolean

Specifies whether LogReduce is enabled.

false

log_reduce_black_list

array

The blacklist for filtering LogReduce fields. This parameter takes effect only when LogReduce is enabled.

string

The blacklisted field.

b

log_reduce_white_list

array

The whitelist for filtering LogReduce fields. This parameter takes effect only when LogReduce is enabled.

string

The whitelisted field.

a

max_text_len

integer

By default, the maximum length of a field value in Simple Log Service is 2,048 bytes (2 KB). To modify the maximum length of a field value, you can set the maximum length of a statistical field (text). Valid values: 64 to 16384 bytes.

2048

storage

string

The storage type. The value is fixed as pg.

pg

ttl

integer

The time-to-live (TTL) of the index file. Valid values: 7, 30, and 90 days.

30

Examples

Success response

JSON format

{
  "index_mode": "v2",
  "keys": {
    "key": {
      "alias": "myAlias",
      "caseSensitive": true,
      "chn": true,
      "doc_value": true,
      "embedding": "sls-multilang-v3",
      "index_all": true,
      "json_keys": {
        "key": {
          "alias": "myAlias",
          "caseSensitive": true,
          "chn": true,
          "doc_value": true,
          "token": [
            "|"
          ],
          "type": "text"
        }
      },
      "max_depth": 10,
      "token": [
        "|"
      ],
      "type": "text",
      "vector_index": "high_recall"
    }
  },
  "lastModifyTime": 1524155379,
  "line": {
    "caseSensitive": false,
    "chn": false,
    "exclude_keys": [
      "excludeField"
    ],
    "include_keys": [
      "includeField"
    ],
    "token": [
      ","
    ]
  },
  "log_reduce": false,
  "log_reduce_black_list": [
    "b"
  ],
  "log_reduce_white_list": [
    "a"
  ],
  "max_text_len": 2048,
  "storage": "pg",
  "ttl": 30
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.