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

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

Creates a partition.

Parameters

hsmid

The serial number of the HSM of interest

Use: Required

JSON Schema:

   Object
   type: string

defaultDomain

Indicates whether to create the partition with a default domain. Note that if you set this flag to true the domain parameter is ignored. Either the defaultDomain parameter or the domain parameter is required when creating a legacy partition.

Use: Not Required

JSON Schema:

   Object
   type: boolean
         false = do not use a default domain
         true = use a default domain

defaultChallenge

Indicates whether to create the partition with a default challenge.

Use: Not Required

JSON Schema:

   Object
   type: boolean
         false = do not use a default challenge
         true = use a default challenge

name

A user-friendly text string to reference the partition after it is created

Use: Required

JSON Schema:

   Object
   type: string

allStorageSpace

Indicates whether to create the partition with all available storage space assigned to it. Note that if you set this flag to true the size parameter is ignored. Either the allStorageSpace parameter or the size parameter is required when creating a legacy partition.

Use: Not Required

JSON Schema:

   Object
   type: boolean
         false = do not use all available storage space
         true = assign all remaining, available storage space to the partition

label

A user-friendly text string to reference the partition after it is created The label parameter is required when creating a legacy partition.

Use: Not Required

JSON Schema:

   Object
   type: string

domain

The cloning domain name associated with password-based partitions (not applicable for PED-based partitions). For PED-based partitions, you must provide the "domain" parameter with the POST: use "" in this case. Either the defaultDomain parameter or the domain parameter is required when creating a legacy partition.

Use: Not Required

JSON Schema:

   Object
   type: string

hasPso

Indicates whether to create the partition with a Security Officer

Use: Required

JSON Schema:

   Object
   type: boolean
         false = do not create the partition with a Security Officer
         true = create the partition with a Security Officer

password

The password for password-based partitions (not applicable for PED-based partitions) The password parameter is required when creating a legacy partition.

Use: Not Required

JSON Schema:

   Object
   type: string

size

The number of bytes of storage space to assign to the partition if allStorageSpace is false Either the allStorageSpace parameter or the size parameter is required when creating a legacy partition.

Use: Not Required

JSON Schema:

   Object
   type: integer

Responses

204

Partition details

JSON Schema: Partition description

Location

"Location" is the URL to the partition and is returned in the server response. You can use "Location" to form a GET resource to obtain the partition.

see GET /api/lunasa/hsms/{hsmid}/partitions/{partitionid}


For PED-based partitions, "Location" is the URL to the task spawned to create the partition.

400

Unexpected error

404

HSM does not exist.

Example Request

   POST 
   https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions
   {
      "defaultDomain": true,
      "defaultChallenge": true,
      "name": "123",
      "allStorageSpace": false,
      "label": "123",
      "domain": "",
      "hasPso": false,
      "password": "",
      "size": 20480
   }    

Example Result

Password-based partition:
{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/api/lunasa/hsms/151256/partitions/352170252337', 'Content-Length': '712', 'Access-Control-Allow-Credentials': 'true'}

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

{
}