Help Center> Document Database Service> API Reference> API Description> Backup and Restoration> Obtaining the Link for Downloading a Backup File

Obtaining the Link for Downloading a Backup File

Function

This API is used to obtain the link for downloading a backup file.

Constraints

This API is used to query full and incremental backups of the DDS DB instance.

URI

  • URI format

    GET https://{Endpoint}/v3/{project_id}/backups/download-file?instance_id={instance_id}&backup_id={backup_id}

  • Example

    https://rds.cn-north-1.myhuaweicloud.com/v3/97b026aa9cc4417888c14c84a1ad9860/backups/download-file?instance_id=befb1cfe1f96403780396b0c54f85d11in02&backup_id=bd062e1af2d248b3bb4cd3dbb4183888br02

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    instance_id

    Yes

    Specifies the DB instance ID.

    backup_id

    Yes

    Specifies the backup ID.

Requests

None

Responses

  • Normal response
    Table 2 Parameter description

    Name

    Type

    Description

    files

    Array of objects

    Indicates the list of backup files.

    For more information, see Table 3.

    bucket

    String

    Indicates the name of the bucket where the file is located.

    Table 3 files field data structure description

    Name

    Type

    Description

    name

    String

    Indicates the file name.

    size

    Long

    Indicates the file size in KB.

    download_link

    String

    Indicates the link for downloading the backup file.

    link_expired_time

    String

    Indicates the 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, the time zone offset of UTC is shown as +0000.

  • Example normal response
    {
       "files": [
        {
            "name": "43e4feaab48f11e89039fa163ebaa7e4br02.xxx",
            "size": 2803,
            "download_link":"https://obs.domainname.com/rdsbucket.username.1/xxxxxx",
            "link_expired_time":"2018-08-016T10:15:14+0000"
         }
         ],
        "bucket": "rdsbucket.bucketname"
    }
    
  • Abnormal Response

    For details, see Abnormal Request Results.

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.