REST API
15
REST API for Luna Network HSMs
|
Replaces the current NTLS certificate with a file.
The resource works in two different ways to install certificate:
Users with the following role privileges can perform this command:
application/vnd.safenetinc.lunasa+octet-stream;version=
application/vnd.safenetinc.lunasa+json;version=
Specifies the filename of the certificate found in the user's home directory.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 64 pattern: [a-zA-Z0-9_. -]
Success
JSON Schema:
id: Object type: string
"Location" is the URL to the task spawned to regenerate the certificate. The task is a waiting task.
If certificate is not valid
If certificate is currently expired
If user has not used octet-stream request for attaching file.
If any unexpected error occurs
If user has provided restricted certificate filename.
If certificate 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="}
PUT https://1.2.3.4:8443/api/lunasa/ntls/certificate { }
PUT https://1.2.3.4:8443/api/lunasa/ntls/certificate { "file":"signed_server.pem" }
{}