upgrade_hotfix¶
Summary¶
Details¶
-
PUT
/api/app/v1/
(i_type)/
(command)/download
¶ Stop/pause a currently downloading upgrade/hotfix file.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
- command (required) – Command to perform, either pause or stop
Query Parameters: - file (optional) – File to delete
- id (optional) – The ID associated with an available hotfix (only valid when i_type == hotfix)
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin
Example 1 - Request: Pause an upgrade download:
PUT /api/app/v1/upgrade/pause/download?file=upgrade.iso HTTP/1.1 Accept: text/html
Example 1 - Response: Pause an upgrade download:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
POST
/api/app/v1/
(i_type)/browser_upload
¶ Upload an upgrade/hotfix file from a web browser to the appliance.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Query Parameters: - file (required) – File to upload to the appliance
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 400 Bad Request – Server Error - invalid i_type
Accepted Authorization: admin
Example 1 - Request: Upload an upgrade file to the appliance:
PUT /api/app/v1/upgrade/browser_upload?token=eyJhbGciOiJIUzI1NiIsImV4cCI6MTUwNDExNjMzNSwiaWF0IjoxNTA0MTA5MTM1fQ.eyJyYW5kb21fbnVtYmVyIjowLjkyNDg3MjU5OTQyMjk1MTR9.auaKpyUo-UNsuJ-B-_RaYkWurXti4yBcjoTA0j0eCPA&filename=upgrade_8_5_0_main.iso HTTP/1.1 Accept: text/html
Example 1 - Response: Upload an upgrade file to the appliance:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
GET
/api/app/v1/
(i_type)/browser_upload/validate
¶ Upload an upgrade/hotfix file from a web browser to the appliance.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Query Parameters: - file (required) – File to upload to the appliance
- alias (required) – Filestore to upload from
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin
Example 1 - Request: Upload an upgrade file to the appliance:
PUT /api/app/v1/upgrade/upload?file=upgrade.iso&alias=myfilestore HTTP/1.1 Accept: text/html
Example 1 - Response: Upload an upgrade file to the appliance:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
DELETE
/api/app/v1/
(i_type)/delete
¶ Delete an upgrade/hotfix file from the appliance.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Query Parameters: - file (optional) – File to delete
- id (optional) – The ID associated with an available hotfix (only valid when i_type == hotfix)
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin
Example 1 - Request: Delete an upgrade file from the appliance:
DELETE /api/app/v1/upgrade/delete?file=upgrade.iso HTTP/1.1 Accept: text/html
Example 1 - Response: Delete an upgrade file from the appliance:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
PUT
/api/app/v1/
(i_type)/download
¶ Initiates a download of an upgrade/hotfix file in the background. Use the download status API to check status.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Query Parameters: - file (optional) – Filename of upgrade/hotfix to download
- id (optional) – The ID associated with an available hotfix (only valid when i_type == hotfix)
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin
Example 1 - Request: Start an upgrade download:
PUT /api/app/v1/upgrade/download?file=upgrade.iso HTTP/1.1 Accept: text/html
Example 1 - Response: Start an upgrade download:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
PUT
/api/app/v1/
(i_type)/download/resume
¶ Resume a paused download.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Query Parameters: - file (optional) – File to delete
- id (optional) – The ID associated with an available hotfix (only valid when i_type == hotfix)
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin
Example 1 - Request: Pause an upgrade download:
PUT /api/app/v1/upgrade/download/resume?file=upgrade.iso HTTP/1.1 Accept: text/html
Example 1 - Response: Pause an upgrade download:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
GET
/api/app/v1/
(i_type)/download/status
¶ Get status of the download of an upgrade/hotfix file.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Query Parameters: - file (optional) – Filename of upgrade/hotfix to download
- id (optional) – The ID associated with an available hotfix (only valid when i_type == hotfix)
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin, audit
Example 1 - Request: Check the status of an upgrade download:
GET /api/app/v1/upgrade/download/status?file=upgrade.iso HTTP/1.1 Accept: text/html
Example 1 - Response: Check the status of an upgrade download:
HTTP/1.1 200 OK Content-Type: application/json { "status": "54" }
-
GET
/api/app/v1/
(i_type)/history
¶ Get upgrade/hotfix history.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin, audit
Example 1 - Request: Get hotfix history:
GET /api/app/v1/hotfix/history HTTP/1.1 Accept: text/html
Example 1 - Response: Get hotfix history:
HTTP/1.1 200 OK Content-Type: application/json { "list": [ { "conflict": "None", "dependence": "None", "description": "Adding CLI commands to setup controller interface. Relogin appliance after applying this hotfix.", "filename": "Websense-Hotfix-App-8.1.3-830.rpm", "id": "App-8.1.3-830", "module": "app", "reboot": "no", "size": 121308, "status": "Downloaded, Ready to Install", "time": "2016-10-12 14:14:10", "version": "8.1.3" } ] }
-
PUT
/api/app/v1/
(i_type)/install
¶ Installs an upgrade/hotfix from the supplied filename. These installations happen in the background. If the hotfix/upgrade requires a reboot you will be able to get the status until the appliance reboots.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Internal Server Error - invalid i_type
Accepted Authorization: admin
Example 1 - Request: Install hotfix:
PUT /api/app/v1/upgrade/install?file=App-Upgrade-8.5.0.iso HTTP/1.1 Accept: text/html
Example 1 - Response: Install hotfix:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
GET
/api/app/v1/
(i_type)/install/status
¶ Get status of currently installing upgrade/hotfix.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Internal Server Error - invalid i_type
Accepted Authorization: admin, audit
Example 1 - Request: Get upgrade install status:
GET /api/app/v1/upgrade/install/status HTTP/1.1 Accept: text/html
Example 1 - Response: Get upgrade install status:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Backing up configuration files" }
-
GET
/api/app/v1/
(i_type)/list
¶ Get a list of upgrades/hotfixes that are eligible for this Appliance.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin, audit
Example 1 - Request: Attempt to get available upgrades when none are available:
GET /api/app/v1/upgrade/list HTTP/1.1 Accept: text/html
Example 1 - Response: Attempt to get available upgrades when none are available:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
Example 2 - Request: Get available upgrades:
GET /api/app/v1/upgrade/list HTTP/1.1 Accept: text/html
Example 2 - Response: Get available upgrades:
HTTP/1.1 200 OK Content-Type: application/json { "list":[ { "description": "Patch to upgrade App to version v8.4.0", "filename": "Websense-Patch-App-8.4.0_1037.rpm", "size": 131345469, "status": "available", "time": "2016-07-21 09:32:59", "version": "8.4.0" } ] }
Example 3 - Request: Get available hotfixes:
GET /api/app/v1/hotfix/list HTTP/1.1 Accept: text/html
Example 1 - Response: Get available hotfixes:
HTTP/1.1 200 OK Content-Type: application/json { "list": [ { "conflict": "None", "dependence": "App-8.4.3-830", "description": "Adding CLI commands to setup controller interface. Relogin appliance after applying this hotfix.", "filename": "Websense-Hotfix-App-8.4.0-830.rpm", "id": "App-8.4.0-830", "module": "app", "reboot": "yes", "size": 121308, "status": "Dependency Failure", "time": "2018-10-12 15:21:30", "version": "8.1.0" }, { "conflict": "None", "dependence": "None", "description": "Adding CLI commands to setup controller interface. Relogin appliance after applying this hotfix.", "filename": "Websense-Hotfix-App-8.4.3-830.rpm", "id": "App-8.4.3-830", "module": "app", "reboot": "no", "size": 121308, "status": "Downloaded, Ready to Install", "time": "2018-10-12 14:14:10", "version": "8.4.3" }, ] }
-
GET
/api/app/v1/
(i_type)/status/
(req_type)¶ Get the list of hotfix/upgrades that are on the local machine and are either installed, uninstalled, deleteable, installable, or all.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
- req_type (required) – Type of file to view, options (installed, uninstalled, deleteable, installable, all)
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin
Example 1 - Request: Show installable upgrades on the appliance:
GET /api/app/v1/upgrade/status/installable HTTP/1.1 Accept: text/html
Example 1 - Response: Show installable upgrades on the appliance:
HTTP/1.1 200 OK Content-Type: application/json { "list": [ { "description": "TEST: Patch that upgrade the Appliance to version v8.5.0", "filename": "App-Upgrade-8.5.0.iso", "module": "app", "reboot": true, "size": 3886022656, "status": "Downloaded, Ready to Install", "time": "1988-01-04 18:14:39", "version": "8.5.0" } ] }
-
PUT
/api/app/v1/
(i_type)/upload
¶ Upload an upgrade/hotfix file from an external filestore to the appliance.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Query Parameters: - file (required) – File to upload to the appliance
- alias (required) – Filestore to upload from
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 404 Not Found – Not found - filestore does not exist
Accepted Authorization: admin
Example 1 - Request: Upload an upgrade file to the appliance:
PUT /api/app/v1/upgrade/upload?file=upgrade.iso&alias=myfilestore HTTP/1.1 Accept: text/html
Example 1 - Response: Upload an upgrade file to the appliance:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
PUT
/api/app/v1/
(i_type)/upload_url
¶ Upload an upgrade/hotfix file from a URL to the appliance.
New in version 1.0.
Parameters: - i_type (required) – Installation type, either upgrade or hotfix
Query Parameters: - url (required) – URL of the file to upload to the appliance
- no-cert-verification (optional) – Do not verify ssl certificate
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 404 Not Found – Not found - filestore does not exist
Accepted Authorization: admin
Example 1 - Request: Upload an upgrade file to the appliance:
PUT /api/app/v1/upgrade/upload?file=upgrade.iso&alias=myfilestore HTTP/1.1 Accept: text/html
Example 1 - Response: Upload an upgrade file to the appliance:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
GET
/api/app/v1/hotfix
¶ Get hotfix information for a specific hotfix file.
New in version 1.0.
Query Parameters: - file (required) – Filename of upgrade/hotfix to get info for
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin, audit
Example 1 - Request: Get hotfix information:
GET /api/app/v1/hotfix/?file=Websense-Hotfix-App-8.4.0-022.rpm HTTP/1.1 Accept: text/html
Example 1 - Response: Get hotfix information:
HTTP/1.1 200 OK Content-Type: application/json { "conflict": "None", "dependence": "None", "description": "App Fake Big Hotfix", "filename": "Websense-Hotfix-App-8.4.0-022.rpm", "id": "App-8.4.0-022", "module": "app", "reboot": "no", "release_note_url": "", "rollup": "None", "size": 555777848, "status": "Downloaded, Ready to Install", "time": "1988-01-04 18:12:46", "url": "http://10.206.22.199/download/hotfixes/app/8.4.0/Websense-Hotfix-App-8.4.0-022.rpm", "version": "8.4.0" }
-
PUT
/api/app/v1/hotfix/uninstall
¶ Uninstall a hotfix.
New in version 1.0.
Query Parameters: - id (required) – ID of the hotfix to uninstall
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Internal Server Error - invalid i_type
Accepted Authorization: admin
Example 1 - Request: Uninstall a hotfix:
PUT /api/app/v1/hotfix/uninstall?id=App-8.4.0-011 HTTP/1.1 Accept: text/html
Example 1 - Response: Uninstall a hotfix:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
PUT
/api/app/v1/schedule_upload_cleanup
¶ Creates a cron job to cleanup any stranded uploads due to cancels.
New in version 1.0.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
Accepted Authorization: admin
Example 1 - Request: Schedule upload cleanup:
PUT /api/app/v1/schedule_upload_cleanup HTTP/1.1 Accept: text/html
Example 1 - Response: Schedule upload cleanup:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }
-
GET
/api/app/v1/upgrade
¶ Get upgrade information for a specific upgrade file.
New in version 1.0.
Query Parameters: - file (required) – Filename of upgrade/hotfix to get info for
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
- 500 Internal Server Error – Server Error - invalid i_type
Accepted Authorization: admin, audit
Example 1 - Request: Get upgrade information:
GET /api/app/v1/upgrade/?file=App-Upgrade-8.5.0.iso HTTP/1.1 Accept: text/html
Example 1 - Response: Get upgrade information:
HTTP/1.1 200 OK Content-Type: application/json { "call": "", "dep_app_vers": [ "8.4.0" ], "dep_hotfixes": [], "dep_vers": [ "8.4.0" ], "description": "TEST: Patch that upgrade the Appliance to version v8.5.0", "duration": "50 minutes", "filename": "App-Upgrade-8.5.0.iso", "license": "http://10.206.6.196/download/patches/license.txt", "logs": [], "md5": "d34fcc5cdb41763b9ad29506e4a526665f2a64be182165b83091dda2fbb65697", "method": "script", "module": "app", "reboot": true, "release_date": "", "release_note_url": "", "size": 3886022656, "snapshot": false, "snapshot_skip": [], "snapsphot_list": [], "status": "Downloaded, Ready to Install", "time": "1988-01-04 20:58:06", "title": "Patch to upgrade Appliance to version v8.5.0", "url": "http://10.206.22.199/download/patches/app/App-Upgrade-8.5.0.iso", "version": "8.5.0" }
Advanced APIs¶
These APIs should only be used by developers building an application, not by the regular user attempting to manage an appliance.
-
PUT
/api/app/v1/upgrade/license
¶ Mount the install ISO and return information and the license.
Warning
This API call should only be used by a custom application implementing appliance upgrade. Not to be used by the regular user.
New in version 1.0.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
Accepted Authorization: admin
Example 1 - Request: Get upgrade license:
PUT /api/app/v1/upgrade/prep_install HTTP/1.1 Accept: text/html
Example 1 - Response: Get upgrade license:
HTTP/1.1 200 OK Content-Type: application/json { "license": [ "License strings" ] }
-
PUT
/api/app/v1/upgrade/prep_install
¶ Prepare the appliance for upgrade.
Warning
This API call should only be used by a custom application implementing appliance upgrade. Not to be used by the regular user.
New in version 1.0.
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – Success
- 400 Bad Request – Bad Request - incorrect parameters
- 401 Unauthorized – Access Denied
Accepted Authorization: admin
Example 1 - Request: Prepare an appliance for upgrade:
PUT /api/app/v1/upgrade/prep_install HTTP/1.1 Accept: text/html
Example 1 - Response: Prepare an appliance for upgrade:
HTTP/1.1 200 OK Content-Type: application/json { "Status": "Success" }