![]() |
REST API
17
REST API for Luna Network HSMs
|
Performs the partition object action.
The serial number of the HSM of interest.
Use: Required
JSON Schema:
Object type: integer format: int64 minimum: 1 maximum: 9999999999
The identifier of the partition of interest
Use: Required
JSON Schema:
Object type: integer format: int64 minimum: 1000000 maximum: 99999999999999999
The identifier of the action to be performed.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 32 pattern: ^[a-zA-Z0-9_.-]*$
The reference to be assigned to a backup device
Use: Required
JSON Schema:
Object type: string
A list of object identifiers to be backed up or 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.
Success, response returned
JSON Schema:
Response returned is specific to the object action performed.
Success, no response returned
"Location" is the URL to the task spawned to perform the requested action on the partition object.
Unexpected error
HSM, partition, or action does not exist.
POST
https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011507/object/actions/backup
{"ids":["31","22","35","36"], "name":"targetBackupName"}
POST
https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011507/object/actions/restore
{"ids":["0","1","2"]}
{'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"
]
}
The 'restore' action returns the new object handles.