REST API
15
REST API for Luna Network HSMs
|
Upload the file to the appliance by the currently logged in user. You may change the value of maxFileSize of webserver to this resource. See webServer Configuration
Uploading of file will take less time when performed in good network.
Users with the following role privileges can perform this command:
The identifier of a user.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 32 pattern: [a-zA-Z_][a-zA-Z0-9._-]{0,31}
No Content, Success
If user has not used multipart request.
If user has not used multipart request.
If user tries to upload multiple files at a time
Unexpected error
Loggedin user isn't allowed to perform this action for this userid.
Operation can not be done for system level users.
Server.pem can not be overwritten.
User does not exist.
If file is not attached with the request.
If user tries to upload file of restricted extension
Request Header Or Body Too Large
The content type of the request needs to be application/vnd.safenetinc.luna+multipart 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+multipart;version="}
POST https://1.2.3.4:8443/users/admin/files { }
Result may also be a task.
{ }
Note: Before calling this API, it is advised to check maxFileSize using GET /api/lunasa/webServer and update via PATCH /api/lunasa/webServer based on the file size.