Skip to main content
REST API reference

Cluster software download endpoint overview

Overview

You can use this API to download a software or firmware package from the server and to check the status of the software or firmware download.

Examples

Downloading the software package

The following example shows how to download the software or firmware package from an HTTP or FTP server. If required, provide the url, username, and password to start the download of the package to the cluster.

# The API:
/api/cluster/software/download

# The call:
curl -X POST "https://<mgmt-ip>/api/cluster/software/download?return_timeout=0" -H "accept: application/json" -H "Content-Type: application/hal+json" -d '{ "url": "http://server/package", "username": "admin", "password": "*********"}'

# The response:
{
"job": {
  "uuid": "f587d316-5feb-11e8-b0e0-005056956dfc",
  "_links": {
    "self": {
      "href": "/api/cluster/jobs/f587d316-5feb-11e8-b0e0-005056956dfc"
    }
  }
}
}

The call to download the software or firmware package returns the job UUID, including a HAL link to retrieve details about the job. The job object includes a state field and a message to indicate the progress of the job. When the job is complete and the application is fully created, the message indicates success and the job state field is set to success.

# The API:
/api/cluster/jobs/{uuid}

# The call:
curl -X GET "https://<mgmt-ip>/api/cluster/jobs/f587d316-5feb-11e8-b0e0-005056956dfc" -H "accept: application/hal+json"

# The response:
{
"uuid": "f587d316-5feb-11e8-b0e0-005056956dfc",
"description": "POST /api/cluster/software/download",
"state": "success",
"message": "success",
"code": 0,
"_links": {
  "self": {
    "href": "/api/cluster/jobs/f587d316-5feb-11e8-b0e0-005056956dfc"
  }
}
}

Checking the progress of the software package being downloaded from an HTTP or FTP server

The following example shows how to retrieve the progress status of the software package that is being downloaded from a HTTP or FTP server.

# The API:
/api/cluster/software/download

# The call:
curl -X GET "https://<mgmt-ip>/api/cluster/software/download" -H "accept: application/hal+json"

# The response:
{
"state": "running",
"message": "Package download in progress",
"code": 10551382,
"_links": {
  "self": {
    "href": "/api/cluster/software/download"
  }
}
}