Obtaining a Quick Search
Function
This API is used to obtain a quick search.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
lts:logStream:listQuickQuery
List
logGroup *
-
- lts:searchcriterias:list
-
URI
GET /v1.0/{project_id}/groups/{group_id}/topics/{topic_id}/search-criterias
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. It can be obtained by calling an API or from the console. For details, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
|
group_id |
Yes |
String |
Definition ID of the log group to which the log stream to be queried belongs. For details about how to obtain it, see Obtaining Log Group and Log Stream IDs. Constraints N/A Range N/A Default Value N/A |
|
topic_id |
Yes |
String |
Definition Log stream ID. For details about how to obtain it, see Obtaining Log Group and Log Stream IDs. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
search_type |
No |
String |
Definition Quick search type. Constraints N/A Range
Default Value N/A |
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 |
|---|---|---|
|
search_criterias |
Array of GetQuerySearchCriteriasBody objects |
Definition Details of quick search. |
|
Parameter |
Type |
Description |
|---|---|---|
|
criteria |
String |
Definition Quick search content. Generally, it is a SQL statement or keyword query statement for visualization. Range N/A |
|
name |
String |
Definition Quick search name. Range N/A |
|
id |
String |
Definition Quick search ID. Range N/A |
|
search_type |
String |
Definition Quick search content. Generally, it is a SQL statement or keyword query statement for visualization. Range
|
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
message |
ErrorMessagebody object |
Definition Error details. |
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition Error code. For details, see Error Codes. Range N/A |
|
details |
String |
Definition Error message. Range N/A |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
message |
ErrorMessagebody object |
Definition Error details. |
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition Error code. For details, see Error Codes. Range N/A |
|
details |
String |
Definition Error message. Range N/A |
Example Requests
Obtain a quick search.
/v1.0/2a473356cca5487f8373be891bffc1cf/groups/d1f4240d-5ee2-4e0b-9e2c-e25c7978c001/topics/2b899d46-218c-4f0c-8ace-a36a290a83a0/search-criterias?search_type=ORIGINALLOG search_type: ORIGINALLOG
Example Responses
Status code: 200
The quick search is obtained.
{
"search_criterias" : [ {
"criteria" : "content : 1234567891234567891234567891234567891234567891234567891234567894",
"name" : "Creating a Number",
"id" : "0eb379f5-f847-4d25-ba89-05967bf1bae3",
"search_type" : "ORIGINALLOG"
} ]
}
Status code: 400
Invalid request. Modify the request based on the description in error_msg before a retry.
{
"message" : {
"code" : "LTS.0208",
"details" : "The log stream does not existed"
}
}
Status code: 500
The server has received the request but encountered an internal error.
{
"error_code" : "LTS.0203",
"error_msg" : "Internal Server Error"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The quick search is obtained. |
|
400 |
Invalid request. Modify the request based on the description in error_msg before a retry. |
|
500 |
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