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.
URI
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/error-log
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
project_id |
String |
Yes |
Explanation: Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. Restrictions: None Value range: The value can contain 32 characters. Only letters and digits are allowed. Default value: None |
instance_id |
String |
Yes |
Instance ID. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
offset |
Integer |
No |
Index offset. If offset is set to N, the resource query starts from the N+1 data entry. The default value is 0, indicating that the query starts from the first data entry. The value cannot be a negative number. For example, if this parameter is set to 0 and limit is set to 10, only the 1st to 10th records are displayed. |
limit |
Integer |
No |
Number of records to be queried. The default value is 10. The value cannot be a negative number. The minimum value is 1 and the maximum value is 100. For example, if this parameter is set to 10, a maximum of 10 records can be displayed. |
start_time |
String |
Yes |
Start time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between calendar and hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800. |
end_time |
String |
Yes |
End time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between calendar and hourly notation of time. Z indicates the time zone offset. For example, in the Beijing time zone, the offset is +0800. Only error logs generated in the past 30 days can be queried. |
Request Parameters
None
Response Parameters
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
total |
Integer |
Yes |
Total number of records. |
log_files |
Array of object |
Yes |
Log files. For details, see Table 4. |
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
file_name |
String |
Yes |
Log file name. |
file_link |
String |
Yes |
Link for downloading the log file. |
file_size |
String |
Yes |
Log file size in KB. |
start_time |
String |
Yes |
Log start time. |
end_time |
String |
Yes |
Log end time. |
status |
String |
Yes |
Log collection status. |
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 Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
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