Obtaining a Download Link for Backup Files (2.4.3)
Function
This API is used to obtain a download link for backup files. Within the validity period of 3,600 seconds, you can directly download the backup file through the URL.
URI
GET /v2/{project_id}/graphs/{graph_id}/backup-files?backup_id={backup_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For how to obtain the project ID, see Obtaining a Project ID. |
graph_id |
Yes |
String |
Graph ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
backup_id |
Yes |
String |
Backup ID. For how to obtain the backup ID, see Viewing the Backup List of a Graph (1.0.0). |
X-Auth-Token |
Yes |
String |
User token Used to obtain the permission to use APIs. For how to obtain the token, see Authentication. (The token is the value of X-Subject-Token in the response header.) |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
bucket |
String |
Name of the bucket where the file is |
files |
Array of objects |
List of backup files. For details, see Table 4. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
File name |
size |
Long |
File size, in KB |
download_link |
String |
File download link
NOTE:
The way a browser opens a link depends on the type of backup file. For instance, text files can be directly viewed in the browser, while binary files will automatically download to the local host when opened in the browser. To download all backup files, you are advised to use an HTTP library in a programming language such as Java's HttpClient or Python's Requests. |
link_expired_time |
String |
Link expiration time, in yyyy-mm-ddThh:mm:ssZ format. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
System prompt
|
error_msg |
String |
System prompt
|
Example Request
Obtain the backup download link.
GET https:/Endpoint/v2/{project_id}/graphs/{graph_id}/backup-files?backup_id=22aa0177-b20b-4f3a-8556-8147d6658ed8
Example Response
Status code: 200
Example response for a successful request
{ "bucket": "string", "files": [ { "name": "43e4feaab48f11e89039fa163ebaa7e4br01.xxx", "size": 2803, "download_link": "https://obs.domainname.com/rdsbucket.username.1/xxxxxx", "link_expired_time": "2018-08-016T10:15:14+0800" } ] }
Status code: 400
Example response for a failed request
{ "error_code": "GES.7006", "error_msg": "The underlying graph engine has internal error." }
Status Codes
Return Value |
Description |
---|---|
400 Bad Request |
Request error. |
401 Unauthorized |
Authorization failed. |
403 Forbidden |
No operation permissions. |
404 Not Found |
No resources found. |
500 Internal Server Error |
Internal server error. |
503 Service Unavailable |
Service unavailable. |
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