Querying the Link for Downloading Error Logs
Function
This API is used to query the link for downloading error logs. Before calling this API:
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
Debugging
You can debug this API in API Explorer.
URI
GET /v3/{project_id}/instances/{instance_id}/error-log
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID of a tenant in a region. To obtain the value, see Obtaining a Project ID. Constraints N/A Range The value can contain 32 characters. Only letters and digits are allowed. Default Value N/A |
| instance_id | Yes | String | Definition Instance ID, which uniquely identifies an instance. For details about how to obtain the instance ID, see Querying DB Instances. Constraints N/A Range The value can contain 36 characters. Only letters and digits are allowed. Default Value N/A |
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| offset | Integer | No | Definition Index offset. The query starts from the next piece of data indexed by this parameter. For example, if this parameter is set to 0 and limit is set to 10, only the 1st to 10th records are displayed. Constraints The value must be a non-negative integer. Range Non-negative number Default Value 0: The query starts from the first data record. |
| limit | Integer | No | Definition Number of records returned by a query. For example, if this parameter is set to 10, a maximum of 10 records can be displayed. Constraints N/A Range 1–100 Default Value 10 |
| start_time | String | Yes | Definition Start time in the yyyy-mm-ddThh:mm:ssZ format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800. Constraints N/A Range N/A Default Value N/A |
| end_time | String | Yes | Definition End time in the yyyy-mm-ddThh:mm:ssZ format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the time zone offset is shown as +0800. Constraints
Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. You can obtain the token by calling the IAM API used to obtain a user token. After a response is returned, the value of X-Subject-Token in the response header is the token. Constraints N/A Range N/A Default Value N/A |
| X-Language | No | String | Definition Language. Constraints N/A Range
Default Value en-us |
Response Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| total | Integer | Yes | Definition Total number of error logs. Range N/A |
| log_files | Array of object | Yes | Definition Log files. For details, see Table 5. |
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file_name | String | Yes | Definition Log file name. Range N/A |
| file_link | String | Yes | Definition Link for downloading the log file. Range N/A |
| file_size | String | Yes | Definition Log file size in KB. Range N/A |
| start_time | String | Yes | Definition Log start time. Range N/A |
| end_time | String | Yes | Definition Log end time. Range N/A |
| status | String | Yes | Definition Log collection status. Range
|
Example Request
GET https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/0317e6bbae534b8eb8f74f0eafcf1d3din01/error-log?start_time=2022-03-15T10:41:14+0800&end_time=2022-03-16T10:41:14+0800 GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/0317e6bbae534b8eb8f74f0eafcf1d3din01/error-log?start_time=2022-03-15T10:41:14+0800&end_time=2022-03-16T10:41:14+0800
Example Response
{
"total": 1,
"log_files": [{
"status": "ENABLE",
"file_name": "d289e7f024d741698fb94d73316874ffin14_collector_20220506_155941.tar.gz",
"start_time": "1651820343244",
"end_time": "1651823943244",
"file_size": "62",
"file_link": "***"
}]
} Status Codes
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, 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