Obtaining the Backup File URL
Function
This API is used to obtain the download links of backup files.
URI
POST /v2/{project_id}/instances/{instance_id}/backups/{backup_id}/links
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Range: N/A Default Value: N/A |
|
instance_id |
Yes |
String |
Definition: Instance ID. It can be viewed on the instance details page on the DCS console. Constraints: N/A Range: N/A Default Value: N/A |
|
backup_id |
Yes |
String |
Definition: Backup record ID. Constraints: N/A Range: N/A Default Value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
expiration |
Yes |
Integer |
Definition: Validity period of a URL. Constraints: The value must be within 5 minutes and 24 hours. Range: N/A Default Value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
file_path |
String |
Definition: Paths of files in the OBS bucket. Range: N/A |
|
bucket_name |
String |
Definition: OBS bucket name. Range: N/A |
|
links |
Array of LinksItem objects |
Definition: Collection of URLs for downloading backup files. A maximum of 64 links are allowed. |
|
Parameter |
Type |
Description |
|---|---|---|
|
file_name |
String |
Definition: Backup file name. Range: N/A |
|
link |
String |
Definition: URL for downloading backup files. Range: N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Definition: Error message. Range: N/A |
|
error_code |
String |
Definition: Error code. Range: For details, see Error Codes. |
|
error_ext_msg |
String |
Definition: Extended error information. This parameter is not used currently and is set to null. Range: N/A |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Definition: Error message. Range: N/A |
|
error_code |
String |
Definition: Error code. Range: For details, see Error Codes. |
|
error_ext_msg |
String |
Definition: Extended error information. This parameter is not used currently and is set to null. Range: N/A |
Example Requests
Obtaining the download links of backup files with 1800s validity
POST https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/backups/{backup_id}/links
{
"expiration" : 1800
}
Example Responses
Status code: 200
Successfully obtained backup file URLs.
{
"file_path" : "42489641-23c4-4855-bc89-befc85e2b7f7/ddfe5f66-a965-43ff-aec7-f3b489dc071b/",
"bucket_name" : "bucket5da9cf3bfabc4cae9023695b934e5e2b",
"links" : [ {
"file_name" : "redis_192.168.63.250_6379_10923-16383_20190820211816.rdb",
"link" : "https://bucket5da9cf3bfabc4cae9023695b934e5e2b.{obs_endpoint}:443/42489641-23c4-4855-bc89-befc85e2b7f7/ddfe5f66-a965-43ff-aec7-f3b489dc071b/redis_192.168.63.250_6379_10923-16383_20190820211816.rdb?AWSAccessKeyId=VD8CEQNG8VMQODUAAM0D&Expires=1566308915&Signature=s3I%2BrLbo%2BFZw%2BUsjVere%2FOQdKEg%3D"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successfully obtained backup file URLs. |
|
400 |
Invalid request. |
|
500 |
Internal service error. |
Error Codes
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