Download a File#

The download of a file consists of three steps:

  1. Initiate provisioning of the File

  2. Check status of provisioning and wait for it to finish

  3. Download the file

Initiate file Provisioning - Endpoint#

Endpoint#
 POST https://api.cloudplan.net/api/file/download_init

Initiate file Provisioning - Request Parameters#

Possible request parameters#
{
    "file_id": "",
    "folder_cp_id": ""
}

file_id | (string)

Id of the file to be downloaded. See List all Root Directories and List Folder Content.

folder_cp_id | (string)

Id of the parent folder of the given file. See also List all Root Directories and List Folder Content.

Initiate file Provisioning - Reply Parameters#

JSON Reply#
{
    "data": {
        "downloadId": "",
        "fileAccessKey": "",
        "file_cp_id": "",
        "folder_cp_id": "",
        "blockCount": 0,
        "blocksAvailable": 0,
        "downloadable": True,
        "download_url": ""
    }
}

downloadId | (string)

The id of the download. Required for the other related requests.

fileAccessKey | (string)

Access key for the download. Required for other related requests.

file_cp_id | (string)

Id of the file in this download.

folder_cp_id | (string)

Id of the parent folder of the file in this download.

blockCount | (integer)

Number of total file blocks of the given file.

blocksAvailable | (integer)

Number of already provisioned blocks.

downloadable | (bool)

Indicates wether the provisioning of the file has been completed.

download_url | (string)

Absolute URL to download the file. Only available when provisioning is finished.

Check Download Status - Endpoint#

Endpoint#
 POST https://api.cloudplan.net/api/file/download_status

Check Download Status - Request Parameters#

Possible request parameters#
{
    "downloadId": "",
    "fileAccessKey": ""
}

downloadId | (string)

Id of the download to check, see initiation request above.

fileAccessKey | (string)

Access key of the download to check, see initiation request above.

Check Download Status - Reply Parameters#

Note

Reply has the same structure as /download_init above.