upload

Code

BIGIQ.upload(path: str, filename: str) None

Uploads a file to the device.

Sends an HTTP POST request to the iControl REST API.

Parameters:
  • path – HTTP path used in the HTTP request sent to the device.

  • filename – Name of the file to be uploaded.

Exceptions:

RESTAPIError: Raised when iControl REST API returns an error.

Example

device.upload(
    "/mgmt/shared/file-transfer/uploads", "bigrest.iso")

Explanation

This upload the local file to the device.
The API limit uploads to chunks of 1M, so BIGREST will handle that.
You just need to pass the HTTP path to the location to upload and the local file.
I am only aware of one location that you can upload files to BIG-IQ.
Folder: /var/config/rest/downloads
HTTP path: /mgmt/shared/file-transfer/uploads
/var/config/rest/downloads is the folder created for iControl REST API downloads and uploads.