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
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
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
Parameter |
Type |
Description |
---|---|---|
fullTextIndex |
LTSFullTextIndexInfo object |
Full-text indexing configuration. |
fields |
Array of LTSFieldsInfo objects |
Field indexing configuration. |
logStreamId |
String |
Log stream ID. |
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 |
Parameter |
Type |
Description |
---|---|---|
fieldType |
String |
Definition Log field type for field indexing. Constraints N/A Range
Default Value string |
fieldName |
String |
Definition Log field name for field indexing. Constraints
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
Default Value false |
includeChinese |
Boolean |
Definition Whether field indexing includes Chinese characters. Constraints N/A Range
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
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 |
Parameter |
Type |
Description |
---|---|---|
fieldType |
String |
Definition Log field type for field indexing. Constraints N/A Range
Default Value string |
fieldName |
String |
Definition Log field name for field indexing. Constraints
Range Field in the sample log. Default Value N/A |
quickAnalysis |
Boolean |
Definition Whether to enable quick analysis for field indexing. Constraints
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
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
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot