REST API  14
REST API for Luna Network HSMs
PUT /api/lunasa/hsms/{hsmid}

PUT /api/lunasa/hsms/{hsmid}

Initializes a specific HSM.

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: string

ped

Indicator of whether HSM is local PED (0) or remote PED (> 0): not applicable for password-based HSMs

Use: Required

JSON Schema:

   Object
   type: string

password

The Security Officer password if password-based HSM: not applicable for PED-based HSMs

Use: Required

JSON Schema:

   Object
   type: string

domain

The cloning domain if password-based HSM: not applicable for PED-based HSMs

Use: Required

JSON Schema:

   Object
   type: string

label

The user-friendly name to identify the HSM

Use: Required

JSON Schema:

   Object
   type: string

defaultDomain

Use a default cloning domain if password-based HSM: not applicable for PED-based HSMs

Use: Required

JSON Schema:

   Object
   type: boolean

Responses

204

Success

Location

"Location" is the URL to the HSM instance and is returned in the server response. You can use "Location" to form a GET resource to query the HSM instance.

see GET /api/lunasa/hsms/{hsmid}


For PED-based HSMs, "Location" is the URL to the task spawned to initialize the HSM.

400

Unexpected error

404

HSM does not exist.

Example Requests

   PUT
   https://1.2.3.4:8443/api/lunasa/hsms/154704
   {
   "ped": "1",
   "label": "myPEDHSM",
   "password": "",
   "defaultDomain": false,
   "domain": ""
   }

   PUT
   https://1.2.3.4:8443/api/lunasa/hsms/151256
   {
   "ped": "",
   "label": "myPasswordHSM",
   "password": "myPassword",
   "defaultDomain": false,
   "domain": "myDomain"
   }

Example Result

{
password-based HSM:
{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/api/lunasa/hsms/151256', 'Content-Length': '2', 'Access-Control-Allow-Credentials': 'true'}

PED-based HSM
{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/tasks/2', 'Content-Length': '712', 'Access-Control-Allow-Credentials': 'true'}
}