Querying Logs
Function
This API is used to query logs.
Constraints
This API has the following constraints:
Parameters marker, limit, and page_reverse are used for pagination query.
Parameters marker and page_reverse take effect only when they are used together with parameter limit.
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/elb/logtanks
Parameter | Mandatory | Type | Description |
|---|---|---|---|
project_id | Yes | String | Definition: Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID. Constraints: N/A Range: The value can contain a maximum of 32 characters, including digits and lowercase letters. Default value: N/A |
Parameter | Mandatory | Type | Description |
|---|---|---|---|
limit | No | Integer | Definition: Specifies the number of records returned on each page. Constraints: N/A Range: 0 to 2000 Default value: 2000 |
marker | No | String | Definition: Specifies the ID of the last record on the previous page. Constraints:
Range: N/A Default value: N/A |
page_reverse | No | Boolean | Definition: Specifies whether to use reverse query. Constraints:
Range:
Default value: false |
enterprise_project_id | No | Array of strings | Definition: Specifies the ID of the enterprise project. Multiple values can be used for query in the format of: enterprise_project_id=xxx&enterprise_project_id=xxx. Constraints:
Range: N/A Default value: N/A |
id | No | Array of strings | Definition: Specifies the ID of the log tank. Multiple IDs can be used for query in the format of id=xxx&id=xxx. Constraints: N/A Range: N/A Default value: N/A |
loadbalancer_id | No | Array of strings | Definition: Specifies the ID of the load balancer. Multiple IDs can be used for query in the format of loadbalancer_id=xxx&loadbalancer_id=xxx. Constraints: N/A Range: N/A Default value: N/A |
log_group_id | No | Array of strings | Definition: Specifies the log group ID. Multiple IDs can be used for query in the format of log_group_id=xxx&log_group_id=xxx. Constraints: N/A Range: N/A Default value: N/A |
log_topic_id | No | Array of strings | Definition: Specifies the log topic ID. Multiple IDs can be used for query in the format of log_topic_id=xxx&log_topic_id=xxx. Constraints: N/A Range: N/A Default value: N/A |
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
X-Auth-Token | Yes | String | Definition: Specifies the token used for IAM authentication. Constraints: N/A Range: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter | Type | Description |
|---|---|---|
logtanks | Array of Logtank objects | Definition: Provides supplementary information. |
page_info | PageInfo object | Definition: Specifies the pagination information. |
request_id | String | Definition: Specifies the request ID. Range: The value is automatically generated, and can contain characters including digits, lowercase letters, and hyphens (-). |
Parameter | Type | Description |
|---|---|---|
id | String | Definition: Specifies the log ID. Range: N/A |
project_id | String | Definition: Specifies the project ID. For details about how to obtain a project ID, see Obtaining a Project ID. Range: The value can contain a maximum of 32 characters, including digits and lowercase letters. |
loadbalancer_id | String | Definition: Specifies the load balancer ID. Range: N/A |
log_group_id | String | Definition: Specifies the log group ID. Range: N/A |
log_topic_id | String | Definition: Specifies the log topic ID. Range: N/A |
Parameter | Type | Description |
|---|---|---|
previous_marker | String | Definition: Specifies the ID of the first record in the pagination query result. If page_reverse is set to true, this parameter is used together to query resources on the previous page. Range: N/A |
next_marker | String | Definition: Specifies the ID of the last record in the pagination query result. It is usually used to query resources on the next page. Range: N/A |
current_count | Integer | Definition: Specifies the number of records returned on the current page. Range: N/A |
Example Requests
Querying logs of multiple load balancers
GET https://{ELB_Endpoint}/v3/060576798a80d5762fafc01a9b5eedc7/elb/logtanks?loadbalancer_id=995b98d7-6010-4502-a91a-756f399088f8&loadbalancer_id=37e9c3e3-08a2-48e9-acee-431159a33cc2 Example Responses
Status code: 200
OK
{
"request_id" : "5b43d31cd5217ffca57c2c4177e1b1ee",
"logtanks" : [ {
"project_id" : "060576798a80d5762fafc01a9b5eedc7",
"log_topic_id" : "5b9b8370-a1fc-4c59-a509-483a673c8a94",
"id" : "281e8768-94f9-45e9-9f3d-9fe2a122ad67",
"log_group_id" : "7733882e-f7fa-4fb0-a460-0605c48a2280",
"loadbalancer_id" : "995b98d7-6010-4502-a91a-756f399088f8"
} ],
"page_info" : {
"next_marker" : "281e8768-94f9-45e9-9f3d-9fe2a122ad67",
"previous_marker" : "281e8768-94f9-45e9-9f3d-9fe2a122ad67",
"current_count" : 1
}
} Status Codes
Status Code | Description |
|---|---|
200 | OK |
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.

