Querying Logs
Function
This API is used to query logs.
Calling Method
For details, see Calling APIs.
URI
GET /v1/logtanks
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
Integer |
Specifies the number of resources on each page. If this parameter is not specified, the default value is 500. |
marker |
No |
String |
Specifies the ID of the resource from which pagination query starts, that is, the ID of the last resource on the previous page. If the parameter is not specified, only resources on the first page are queried. This parameter must be used together with limit. |
id |
No |
String |
Specifies the resource ID. |
status |
No |
String |
Specifies the resource status. The value can be one of the following:
|
resource_ids |
No |
Array of strings |
Specifies the resource IDs. |
resource_type |
No |
String |
Specifies the type of the resource associated with the log. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. The token can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
logtanks |
Array of LogtankDetail objects |
Specifies the response parameters for a log. |
page_info |
PageInfo object |
Specifies the pagination query information. |
request_id |
String |
Specifies the request ID. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the log ID. |
domain_id |
String |
Specifies the tenant ID. |
project_id |
String |
Specifies the project ID. |
resource_type |
String |
Specifies the type of the resource associated with the log. |
resource_id |
String |
Specifies the ID of the resource for which LTS is enabled. |
log_group_id |
String |
Specifies the log group ID. |
log_stream_id |
String |
Specifies the log stream ID. |
status |
String |
Specifies the provisioning status. The value can be one of the following:
|
created_at |
String |
Specifies the time when the log was created. |
updated_at |
String |
Specifies the time when the log was updated. |
Example Requests
Querying logs
GET https://{ga_endpoint}/v1/logtanks
Example Responses
Status code: 200
Operation succeeded.
{ "logtanks" : [ { "id" : "ac1bf54f-6a23-4074-af77-800648d25bc8", "domain_id" : "99a3fff0d03c428eac3678da6a7d0f24", "project_id" : "644056c6947343d498427218e271b545", "resource_type" : "LISTENER", "resource_id" : "78d425da-4d5f-422f-b13b-40aa3f49bc55", "log_group_id" : "0b43cca4-a11a-4444-8ac5-2feee53a48ab", "log_stream_id" : "43afe287-2a2d-4bf2-a67d-8a027b9ed80c", "status" : "ACTIVE", "created_at" : "2019-01-08T01:21:37Z", "updated_at" : "2019-01-08T01:21:37Z" } ], "page_info" : { "next_marker" : "09e86f09-03fc-440e-8132-03f3e149e979", "current_count" : 10 }, "request_id" : "string" }
Status Codes
Status Code |
Description |
---|---|
200 |
Operation succeeded. |
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