REST API
15
REST API for Luna Network HSMs
|
Creates a partition.
The serial number of the HSM of interest
Use: Required
JSON Schema:
Object type: string
A user-friendly text string to reference the partition after it is created
Use: Required
JSON Schema:
Object type: string pattern: abcdefghijklmnopqurstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789!@#$%^*()-_=+{}[]:,./~ and space minLength: 1 maxLength: 32
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
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
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
The partition version. Options are 0 and 1, defaults to 0.
Use: Not Required
JSON Schema:
Object type: integer
Partition details
JSON Schema: Partition description
"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.
Unexpected error
HSM does not exist.
POST https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions { "name": "123", "allStorageSpace": false, "hasPso": true, "size": 324562, "version": 1 }
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'} { }