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 |
Definition Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints N/A Range The value contains 32 characters. Only letters and digits are allowed. Default Value N/A |
instance_id |
Yes |
String |
Definition Instance ID, which uniquely identifies an instance. Constraints N/A Range The value contains 36 characters with a suffix of in07. Only letters and digits are allowed. Default Value N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition User token. To obtain this value, call the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the token value. Constraints N/A Range N/A Default Value N/A |
X-Language |
No |
String |
Definition Request language type. Constraints N/A Range Default Value en-us |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
files |
Array of FileInfo objects |
Definition Obtained full SQL file information. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Definition File name. Range N/A |
size |
Long |
Definition File size, in KB. Range N/A |
updated_time |
String |
Definition 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. Range N/A |
download_link |
String |
Definition Link for downloading the file. Range N/A |
link_expired_time |
String |
Definition 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. Range N/A |
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
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