# Cloud Download Controller Resource

The API allows you to create, list and delete cloud downloads

### GET /cloud-download

Retrieves list of cloud downloads

Request Parameters
name | type | description | constraints
--- | --- | --- | ---
backup | query |  |
direction | query |  |
filter | query |  |
finished-mount | query |  | boolean
mode | query |  | "AUTO" or "CLOUD_DOWNLOAD" or "CLOUD_PST_DOWNLOAD" or "INSTANT_RESTORE" or "ISCSI" or "MANUAL" or "OS_DOWNLOAD"
nameLike | query |  |
node | query |  |
orderBy | query |  |
page | query |  |
project-uuid | query |  |
protected-entity | query |  |
protected-entity-type | query |  | "APP" or "CLOUD" or "CLOUD_GROUP" or "CLOUD_SITE" or "CLOUD_TEAMS" or "CLOUD_USER" or "OS" or "OS_AGENT" or "STORAGE" or "VM"
size | query |  |

Response Body
media type | data type | description
--- | --- | ---
application/json | array of MountedBackupListRecord (JSON) | download details

#### Example

##### Request

    GET /cloud-download
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    [ {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "mode" : {
        "name" : "ENUM_NAME",
        "description" : "Enum description"
      }
    } ]

### POST /cloud-download

Creates cloud download for list of protected objects

Request Body
media type | data type | description
--- | --- | ---
application/json | CreateCloudDownloadRequest (JSON) | create cloud download request

Response Body
media type | data type | description
--- | --- | ---
application/json | array of TaskDetails (JSON) | download details

#### Example

##### Request

    POST /cloud-download
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

    HTTP/1.1 201 Created
    Content-Type: application/json

    [ {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "type" : {
        "name" : "ENUM_NAME",
        "description" : "Enum description"
      },
      "state" : {
        "name" : "ENUM_NAME",
        "description" : "Enum description"
      },
      "windowStart" : 1451649601000,
      "windowEnd" : 1451677502000,
      "creationTime" : 1451649601000,
      "finishTime" : 1451677502000,
      "progress" : 66.5,
      "priority" : 50,
      "backupType" : {
        "name" : "ENUM_NAME",
        "description" : "Enum description"
      }
    } ]

### DELETE /cloud-download/{guid}

Deletes cloud download

Request Parameters
name | type | description
--- | --- | ---
guid | path | guid of the cloud download to delete

Response Body
media type | data type | description
--- | --- | ---
application/json | TaskDetails (JSON) |

#### Example

##### Request

    DELETE /cloud-download/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 204 No Content
    Content-Type: application/json

    {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "type" : {
        "name" : "ENUM_NAME",
        "description" : "Enum description"
      },
      "state" : {
        "name" : "ENUM_NAME",
        "description" : "Enum description"
      },
      "windowStart" : 1451649601000,
      "windowEnd" : 1451677502000,
      "creationTime" : 1451649601000,
      "finishTime" : 1451677502000,
      "progress" : 66.5,
      "priority" : 50,
      "backupType" : {
        "name" : "ENUM_NAME",
        "description" : "Enum description"
      }
    }

### GET /cloud-download/{guid}

Retrieves cloud download

Request Parameters
name | type | description
--- | --- | ---
guid | path | guid of the cloud download to retrieve

Response Body
media type | data type | description
--- | --- | ---
application/octet-stream | object |

#### Example

##### Request

    GET /cloud-download/{guid}
    Content-Type: */*
    Accept: application/octet-stream

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/octet-stream

    ...

### PUT /cloud-download/{guid}

Updates cloud download status

Request Parameters
name | type | description
--- | --- | ---
guid | path |

Request Body
media type | data type | description
--- | --- | ---
application/json | UpdateDownloadRequest (JSON) | update cloud download request

Response Body
media type | data type | description
--- | --- | ---
application/json | MountedBackupDetails (JSON) | download details

#### Example

##### Request

    PUT /cloud-download/{guid}
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

    HTTP/1.1 204 No Content
    Content-Type: application/json

    {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "mode" : {
        "name" : "ENUM_NAME",
        "description" : "Enum description"
      }
    }

### GET /cloud-download/{guid}/content-download

Request Parameters
name | type | description
--- | --- | ---
guid | path |

Response Body
media type | data type | description
--- | --- | ---
application/json | UniOfVoid (JSON) |

#### Example

##### Request

    GET /cloud-download/{guid}/content-download
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    { }