REST API  17
REST API for Luna Network HSMs
POST /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/roles/{roleid}/actions/{actionid}

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

Sends the specified partition role action to the HSM.

Parameters

hsmid

The serial number of the HSM of interest.

Use: Required

JSON Schema:

   Object
   type: integer
   format: int64
   minimum: 1
   maximum: 9999999999

roleid

The identifier of the HSM role of interest

Use: Required

JSON Schema:

   Object
   type: string
   minLength: 1
   maxLength: 32
   pattern: ^[a-zA-Z0-9_.-]*$

partitionid

The identifier of the partition of interest

Use: Required

JSON Schema:

   Object
   type: integer
   format: int64
   minimum: 1000000
   maximum: 99999999999999999

actionid

The identifier of the action to be performed.

Use: Required

JSON Schema:

   Object
   type: string
   minLength: 1
   maxLength: 32
   pattern: ^[a-zA-Z0-9_.-]*$

See Partition Role Actions

password

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

Use: Not Required

JSON Schema:

   Object
   type: string
   format: password
   minLength: 8
   maxLength: 255
   pattern: ^([a-zA-Z0-9_!#$%'()*+,./:=? @[]^{}~-]*)$

defaultChallenge

Applies for the "createChallenge" action. The new challenge for a PED-based partition. 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: boolean

Responses

204

Success

Location

JSON Schema:

    id: Object
        type: string

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

400

FRAMEWORK_BAD_REQUEST

Returned when the input data does not conform to the required validation schema.

404

HSM, partition, role or action does not exist.

Example Request

   POST 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/352170252337/roles/co/actions/reset
   { "password": "newpassword" }

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

   POST
   https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/352170252337/roles/co/actions/createChallenge
   {"password" : "newpassword" }

   POST 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/352170252337/roles/co/actions/deactivate
   {}

Example Result

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

{
}