![]() |
REST API
17
REST API for Luna Network HSMs
|
This resource creates a REST API role. Can only contain alphanumeric characters. It will be available in LunaSH too. Only the "exit" command will be accessible in LunaSH through this resource.
Users with the following role privileges can perform this command:
The role ID of the role to create.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 64 pattern: ^[a-zA-Z0-9_]*$
The full name of the role.
Use: Not Required
JSON Schema:
Object type: string minLength: 1 maxLength: 32 pattern: ^[a-zA-Z][a-zA-Z0-9_ -]*$
Name of the file existing on the HSM. This file will be used when webserver creates a corresponding role on LunaSH.
If this file is not provided, the role will be created on LunaSH with default LunaSH command permissions, which cannot be changed later.
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_.-])$
Success
"Location" is the URL to the newly created role.
Returned when the input data does not conform to the required validation schema.
POST
https://1.2.3.4:8443/roles
{
"roleId": "restRole",
"fullName": "restRoleName"
}
POST
https://1.2.3.4:8443/roles
{
"roleId": "restRole",
"fullName": "restRoleName",
"file": "roleDefinitionFile.txt"
}
{
}