REST API  14
REST API for Luna Network HSMs
POST /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/policies

POST /api/lunasa/hsms/{hsmid}/partitions/{partitionid}/policies

Export Partition Policy Template. It will overwrite the content of file if the specified file is already exist. Policy template file will be created/updated in user's directory

User Privileges

Users with the following role privileges can perform this command:

  • admin
  • operator
  • monitor

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: integer
   maximum: 9999999999
   minimum: 1

partitionid

The identifier of the partition of interest

Use: Required

JSON Schema:

   Object
   type: integer
   maximum: 9999999999999999
   minimum: 1000000

file

Specifies the filename for a template file in which export the current state of all HSM policies.

Use: Required

JSON Schema:

   Object
   type: string
   minLength: 1
   maxLength: 64
   pattern: [a-zA-Z0-9_. -]

Responses

201

Created

Location

"Location" is the URL to created file. You can use "Location" to form a GET resource to obtain the file.

GET /users/{userid}/files/{fileid}

400

HSMPLUGIN_INVALID_FILENAME

The specified filename is invalid or contains system reserved name.

404

HSMPLUGIN_INVALID_HSM

The HSM specified does not exist.

404

HSMPLUGIN_INVALID_PARTITION

The partition specified does not exist.

Example Request

   POST https://1.2.3.4:8443/api/lunasa/hsms/123456/partitions/1234567891113/policies
   {
       "file": "partitionPolicyTemplate"
   }

Example Result

{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/users/admin/files/partitionPolicyTemplate', 'Content-Length': '712', 'Access-Control-Allow-Credentials': 'true'}
{

}

See Also

GET /users/{userid}/files/{fileid}
GET /users/{userid}/files/{fileid}/download