![]() |
REST API
17
REST API for Luna Network HSMs
|
Initializes the partition.
Users with the following role privileges can perform this command:
The serial number of the HSM of interest..
Use: Required
JSON Schema:
Object type: integer minimum: 1 maximum: 9999999999
The identifier of the partition of interest.
Use: Required
JSON Schema:
Object type: integer format: int64 minimum: 1000000 maximum: 99999999999999999
A user-friendly text string to reference the partition after it is created. The label of the partition will be same as of partition name when no label is provided during partition initialization.
Use: Not Required
JSON Schema:
Object
type: string
minLength: 1
maxLength: 32
pattern: ^[a-zA-Z0-9_ !@#$%^*()=+[]{}/:',.~-]*$
The cloning domain name associated with password-based partitions (not applicable for PED-based partitions).
Use: Required for password-based HSM and optional for PED-based HSM.
JSON Schema:
Object
type: string
minLength: 1
maxLength: 128
pattern: ^[^ &|<>`;"\][a-zA-Z0-9_ !@#$%^*=+[]{}()/:',.~?-]+$
The password for password-based partitions (not applicable for PED-based partitions).
Use: Required for password-based HSM and optional for PED-based HSM.
JSON Schema:
Object
type: string
format: password
minLength: 8
maxLength: 255
pattern: ^([a-zA-Z0-9_!#$%'()*+,./:=? @[]^{}~-]*)$
Specifies the filename for a template file use to initialize the partition. The filename should be either of '.txt' or '.ppt' format.
Use: Not Required
JSON Schema:
Object type: string minLength: 1 maxLength: 128 pattern: ^([a-zA-Z0-9_-]|[a-zA-Z0-9_.-][a-zA-Z0-9_. -]*[a-zA-Z0-9_.-])$
The identifier of the PED connected to the HSM. '0' is local PED; 1 is remote PED. For remote PED, ped corresponds to the PED identifier. The parameter has no use for password-based HSMs.
Use: Not Required
JSON Schema:
Object type: string minLength: 1 maxLength: 1 pattern: ^(?:$|0|1)$
Label for the partition domain to distinguish among domains when a partition has more than one, and to match with domains on other partitions.
Use: Not Required
JSON Schema:
Object
type: string
minLength: 1
maxLength: 32
pattern: ^[a-zA-Z0-9_ $^*()+{}[].'/~!@#%=:,-]+$
Note:
Partition initialized successfully.
"Location" is the URL to the initialized partition and is returned in the server response. You can use "Location" to form a GET resource to query the partition.
see GET /api/lunasa/hsms/{hsmid}/partitions/{partitionid}
For PED-based partitions, "Location" is the URL to the task spawned to initialize the partition.
Returned when the input data does not conform to the required validation schema.
The specified filename is invalid or contains system reserved name.
The HSM specified does not exist.
The partition specified does not exist.
Non-existent file name specified.
PUT
https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011507
{
"password": "password",
"label": "ABC123",
"domain": "domain",
"domainLabel": "testLabel",
"pptFile": "sample_ppt_file.ppt"
}
PUT
https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011507
{
"password": "password",
"domain": "domain"
}
PUT
https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011507
{
"label": "ABC123",
"domainLabel": "testLabel",
"pptFile": "sample_ppt_file.ppt",
"ped": "0"
}
PUT
https://1.2.3.4:8443/api/lunasa/hsms/154704/partitions/273087011507
{
}
{
password-based partition:
{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/api/lunasa/hsms/154704/partitions/273087011507', 'Content-Length': '2', 'Access-Control-Allow-Credentials': 'true'}
PED-based partition:
{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': '/tasks/5', 'Content-Length': '712', 'Access-Control-Allow-Credentials': 'true'}
}