Creating a Master Key
Description
This API is used to create and export a master key that is used to encrypt the working key.
URL
POST https://ip:port/AIVAULT/v1/createMK
Request Header
Parameter |
Type |
Description |
DomainID |
UInt |
Key domain ID, which indicates the domain of an application or a model. The value ranges from 1 to 500. |
- Parameters in this request header are set by users.
- Domain IDs are used to differentiate applications or models. A maximum of 500 domains are supported.
Request Parameters
Parameter |
Mandatory/Optional |
Type |
Description |
MKName |
Mandatory |
String |
Master key name, which must be unique in the same domain. It contains 1 to 128 characters, allowing only digits, letters, underscores (_), and hyphens (-). |
MKUsage |
Mandatory |
String |
Usage of the master key. The value contains 1 to 128 characters, allowing only digits, letters, spaces, underscores (_), and hyphens (-). All spaces are not supported. |
MKRemarks |
Optional |
String |
Remarks. The value contains a maximum of 256 characters, allowing only digits, letters, spaces, underscores (_), and hyphens (-). |
Password |
Mandatory |
String |
User password. The password must contain 40 to 64 characters and contain at least two types of the following characters: digits, uppercase letters, lowercase letters, and special characters. The password cannot be the same as MKName or MKName in reverse order. |
Request Example
https://ip:port/AIVAULT/v1/createMK
{
"MKName":"test",
"MKUsage":"test create",
"MKRemarks":"test create",
"Password" :"******"
}
Response Description
Level-1 Parameter |
Type |
Description |
status |
String |
Error code (returned upon failure) |
msg |
String |
Error information (returned upon failure) |
data |
String |
Packet list (returned upon failure) |
MKFile |
File |
Master key file. If the operation is successful, a JSON file is returned. |
Response Example
{
"Version": "V1",
"CipherMasterKey": "******"
}
For details about the error codes, see Error Codes.
For details about the status codes, see Status Codes.