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

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

Sends the specified action to the HSM.

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: string

actionid

The identifier of the action to be performed

Use: Required

JSON Schema:

   Object
   type: string

randomUserString

The random user string returned when running stmTransport. Applies to the stmRecover action.

Use: Not Required

JSON Schema:

   Object
   type: string

See HSM Actions

Responses

200

Success

Location

JSON Schema:

    id: Object
        type: string

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

400

Unexpected error

404

HSM or action does not exist.

Example Request

   POST
   https://1.2.3.4:8443/api/lunasa/hsms/154704/actions/factoryReset
   {}

   POST
   https://1.2.3.4:8443/api/lunasa/hsms/154704/actions/stmRecover
   {
     "randomUserString" : "AX46-s63t-KL7G-tYt6"
   }

Example Result

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

{
}

stmTransport

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

{
  "randomUserString" : "AX46-s63t-KL7G-tYt6",
  "verification" : "AZ90-s64y-AU0G-tYL9"
}

stmRecover

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

{
  "verification" : "AZ90-s64y-AU0G-tYL9"
}