REST API  4.0.0
REST API for SafeNet Network HSMs
PUT /api/lunasa/hsms/{hsmid}/roles/{roleid}

PUT /api/lunasa/hsms/{hsmid}/roles/{roleid}

Initializes the HSM role.

This resource is forbidden on the HSM.

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: string

roleid

The identifier of the role of interest

Use: Required

JSON Schema:

   Object
   type: string

password

The password to be used to authenticate for the role

Use: Required

JSON Schema:

   Object
   type: string

Responses

204

Success

Location

"Location" is the URL to the role and is returned in the server response. You can use "Location" to form a PATCH resource to change the role password or to form a GET resource to query the role.

see PATCH /api/lunasa/hsms/{hsmid}/roles/{roleid}
see GET /api/lunasa/hsms/{hsmid}/roles/{roleid}


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

400

Unexpected error

404

HSM or role does not exist.

Example Request

   PUT
   https://1.2.3.4:8443/api/lunasa/hsms/roles/co
   { "password": "myPassword" }

Example Result

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

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