Obtaining the Temporary Link for Downloading Full SQL
Function
This API is used to obtain the temporary link for downloading full SQL. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/instance/{instance_id}/auditlog/download-link
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
instance_id |
Yes |
String |
Instance ID, which is compliant with the UUID format. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
start_time |
Yes |
String |
Start time, which cannot be earlier than the instance creation time. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100. |
end_time |
Yes |
String |
End time, which cannot be later than the current time. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100. |
node_id |
No |
String |
Node ID.
|
last_file_name |
No |
String |
Name of the last file queried last time.
|
limit |
No |
Integer |
Number of files returned in one query. Default value: 10. Value: an integer ranging from 1 to 50. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the token value. |
X-Language |
No |
String |
Request language type. The default value is en-us. Values:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
files |
Array of FileInfo objects |
Obtained full SQL file information. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
File name. |
size |
Long |
File size, in KB. |
updated_time |
String |
Last modification time of the SQL file. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100. |
download_link |
String |
Link for downloading the file. |
link_expired_time |
String |
Link expiration time. The format is yyyy-mm-ddThh:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. For example, if the time zone offset is one hour, the value of Z is +0100. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Obtaining the temporary link for downloading full SQL
GET https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instance/669a94abef9f4979b2dfba92f48f4042in07/auditlog/download-link?node_id=2e723b45786148fc94c8737f5980786cno07&last_file_name=20230724160316_99b1d48896bb44178b715d64b68603f9in07_6a21d5df9bb24f5db83121c5fec0b1d2no07_SQLAudit_8b4b53d2-29f8-11ee-92aa-fa163ef00f0d&limit=10&start_time=2023-07-24T09:27:00+0800&end_time=2023-07-25T15:00:14+0800
Example Response
Status code: 200
Success.
{ "files" : [ { "name" : "20230706023359_669a94abef9f4979b2dfba92f48f4042in07_b051c8f7b98f4deeaf88ba97c8daba9dno07_SQLAudit_903bdbb6-1ba5-11ee-8b97-fa163ef0f8c2", "size" : 928, "updated_time" : "2023-07-06T02:43:57+0800", "download_link" : "https://obs.obs.domainname.com/bucketname/userid_instanceid/20230706/SQLAudit/xxxxxx", "link_expired_time" : "2023-07-13T012:30:36+0800" } ] }
Status Code
Status Code |
Description |
---|---|
200 |
Success. |
400 |
Client error. |
500 |
Server error. |
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