![]() |
REST API
17
REST API for Luna Network HSMs
|
Creates a partition.
The serial number of the HSM of interest.
Use: Required
JSON Schema:
Object type: integer format: int64 minimum: 1 maximum: 9999999999
A user-friendly text string to reference the partition after it is created.
Use: Required
JSON Schema:
Object
type: string
minLength: 1
maxLength: 32
pattern: ^[a-zA-Z0-9_ !@#$%^*()=+{}[]:',./~-]*$
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
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.
Returned when the input data does not conform to the required validation schema.
HSM does not exist.
POST
https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions
{
"name": "partition",
"allStorageSpace": false,
"size": 324562,
"version": 1
}
POST
https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions
{
"name": "partitionWithDefault"
}
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'}
{
}