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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
log:GetIndex |
get |
*LogStore
|
|
None |
Request syntax
GET /logstores/{logstore}/index HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| logstore |
string |
Yes |
The Logstore name. |
test-logstore |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
Yes |
The project name. |
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. |
|
|
object |
The index configuration of a single field. |
||
| caseSensitive |
boolean |
Indicates whether case sensitivity is enabled. This parameter is required only when type is set to text. Valid values:
|
|
| chn |
boolean |
Indicates whether Chinese characters are included. This parameter is required only when type is set to text. Valid values:
|
|
| 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. |
|
| doc_value |
boolean |
Indicates whether the analytics feature is enabled for the field. Valid values:
|
|
| alias |
string |
The alias of the field. |
|
| lastModifyTime |
integer |
The time when the index was last updated. This value is a UNIX timestamp representing the number of seconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
1524155379 |
| line |
object |
The full-text index configuration. |
|
| caseSensitive |
boolean |
Specifies whether case sensitivity is enabled. Valid values:
|
false |
| chn |
boolean |
Specifies whether Chinese characters are included. Valid values:
|
false |
| exclude_keys |
array |
The list of excluded fields. |
|
|
string |
The list of excluded fields. |
excludeField |
|
| include_keys |
array |
The list of included fields. |
|
|
string |
The list of included fields. |
includeField |
|
| token |
array |
The list of tokens. |
|
|
string |
The token. For example, ",", ".", "\r", or "\n". |
, |
|
| log_reduce |
boolean |
Specifies whether LogReduce is enabled. |
false |
| log_reduce_black_list |
array |
The blacklist for LogReduce field filtering. This parameter is valid only when LogReduce is enabled. |
|
|
string |
The blacklisted field. |
b |
|
| log_reduce_white_list |
array |
The whitelist for LogReduce field filtering. This parameter is valid only when LogReduce is enabled. |
|
|
string |
The whitelisted field. |
a |
|
| max_text_len |
integer |
The default 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, set the maximum length of the statistical field (text). Valid values: 64 to 16,384 bytes. |
2048 |
| storage |
string |
The storage type. The value is fixed as pg. |
pg |
| ttl |
integer |
The lifecycle of the index file. Valid values: 7, 30, and 90. Unit: days. |
30 |
Examples
Success response
JSON format
{
"index_mode": "v2",
"keys": {
"key": {
"caseSensitive": false,
"chn": false,
"token": [
""
],
"type": "",
"doc_value": false,
"alias": ""
}
},
"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.