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

POST /api/lunasa/hsms/{hsmid}/roles/{roleid}/actions/{actionid}

Sends the specified role action to the HSM.

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: string

roleid

The identifier of the HSM role of interest

Use: Required

JSON Schema:

   Object
   type: string

actionid

The identifier of the HSM role action to be performed

Use: Required

JSON Schema:

   Object
   type: string

See HSM Role Actions

password

Applies for the "reset" action. The new challenge for a password-based HSM. Pass an empty string for a PED-based HSM.

Use: Not required

JSON Schema:

   Object
   type: string

defaultChallenge

Applies for the "createChallenge" action. The new challenge for a PED-based HSM. Pass True to have the challenge set to the default value; pass False to have the challenge set to a random value.

Use: Not required

JSON Schema:

   Object
   type: string

Responses

204

Success

Location

JSON Schema:

    id: Object
        type: string

"Location" is the URL to the task spawned to perform the action for the HSM role.

400

Unexpected error

404

HSM, role or action does not exist.

Example Request

   POST 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/roles/co/actions/createChallenge
   { "defaultChallenge": true }

Example Result

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

{
}