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

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

Performs the action on the object.

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: string

partitionid

The identifier of the partition of interest

Use: Required

JSON Schema:

   Object
   type: string

objectid

The identifier of the object of interest

Use: Required

JSON Schema:

   Object
   type: string

actionid

The identifier of the object action to be performed

Use: Required

JSON Schema:

   Object
   type: string

See Partition Objects Actions

name

The reference to be assigned to a backup device

Use: Required

JSON Schema:

   Object
   type: string

ids

A list of identifier to objects to be backed up or objects restored

Use: Required

JSON Schema:

Array
    id: Object
        type: string
        description:  id is a reference to an object.
                      A null list ([]) means backup or restore all objects.

Responses

200

Success, response returned

JSON Schema:

    Response returned is specific to the object action performed.

204

Success, no response returned

Location

"Location" is the URL to the task spawned to perform the requested action on the partition object.

400

Unexpected error

404

HSM, partition, or action does not exist.

Example Requests

   POST 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011507/objects/actions/backup
   {"ids":["31","22","35","36"], "name":"targetBackupName"}
   
   POST 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011507/objects/actions/restore
   {"ids":["0","1","2"]}

Example Result

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

{}

In this example, do GET on '/tasks/13/response' to get the results of the task, assuming the action was 'restore':

{
    "ids": [
        "19",
        "23",
        "24"
    ]
}

Notes

The 'restore' action returns the new object handles.