![]() |
REST API
14
REST API for Luna Network HSMs
|
This resource is for applying an upgrade file on appliances. This resource requires HSM SO authentication.
The resource works in two different ways:
Users with the following role privileges can perform this command:
application/vnd.safenetinc.lunasa+octet-stream;version=
application/vnd.safenetinc.lunasa+json;version=
The name of file containing the license string that should be uploaded in user's home directory.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 64 pattern: [a-zA-Z0-9_. -]
File with .lic extension and contains valid license, can be accepted as license file File name should not start with dot character(.) and end with space
Success
JSON Schema:
id: Object type: string
"Location" is the URL to the upgrade that has been successfully applied.
If config files do not exist
If HSM SO has not logged in
If the uploaded upgrade file is invalid
If the uploaded upgrade file is already applied on appliance
If user has provided restricted license filename.
If user has not used octet-stream request for attaching file.
If file provided does not exist
The content type of the request needs to be application/vnd.safenetinc.luna+octet-stream to notify the server that it will be receiving a file. Attach the file with the request.
Header format:
headers = {'Content-Type': "application/vnd.safenetinc.lunasa+octet-stream;version="}
POST https://1.2.3.4:8443/api/lunasa/upgrades { }
POST https://1.2.3.4:8443/api/lunasa/upgrades { "file":"kcdsa.lic" }
{}
GET /api/lunasa/upgrades/{upgradeid}
POST /api/lunasa/upgrades
DELETE /api/lunasa/upgrades/{upgradeid}
After an upgrade is applied, SA may take 5-10 seconds to be ready for another request to apply an upgrade.