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
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. Constraints N/A Range The value can contain up to 64 characters. Only letters and digits are allowed. Default Value N/A |
|
graph_id |
Yes |
String |
Definition Graph ID. Constraints N/A Range N/A Default Value N/A |
|
backup_id |
Yes |
String |
Backup ID. For how to obtain the backup ID, see "Viewing the Backup List of a Graph". |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition 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.) Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
bucket |
String |
Definition Name of the bucket where the file is. Range N/A |
|
files |
Array of objects |
Definition List of backup files. For details, see Table 4. Range N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Definition File name. Range N/A |
|
size |
Long |
Definition File size, in KB. Range N/A |
|
download_link |
String |
Definition File download link. Range N/A
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 |
Definition Link expiration time, in yyyy-mm-ddThh:mm:ss format. Range N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition System prompt.
Range N/A |
|
error_msg |
String |
Definition System prompt.
Range N/A |
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_msg": "The graph backup does not exist or has been deleted.",
"error_code": "GES.7024"
}
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