![]() |
REST API
15
REST API for Luna Network HSMs
|
Registers a client with the appliance.
The resource works in three different ways to register client:
Users with the following role privileges can perform this command:
The IP address of the client.
Note: Use this parameter if the client certificate is to be created with IP address. If the certificate is to be created with hostname, use the hostname parameter instead. User cannot use both IP and hostname together.
Use: Not required
JSON Schema:
Object type: string minLength: 2 maxLength: 45 pattern: [a-fA-F0-9:.]
The human-friendly name used to refer the client.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 128 pattern: [A-Za-z0-9_.:-]
The hostname of the new client.
Note: Use this parameter if the client certificate is to be created with hostname. If the certificate is to be created with IP address, use the ip parameter instead. User cannot use both IP and hostname together.
Use: Not required
JSON Schema:
Object type: string minLength: 1 maxLength: 60 pattern: [A-Za-z0-9_.-]
The PEM-encoded certificate for the client.
Use: Not Required
JSON Schema:
Object type: string minLength: 8 maxLength: 8192 pattern: [A-Za-z0-9+=/]
The IP address of the client.
Note: Use this parameter if the client certificate is to be created with IP address. If the certificate is to be created with hostname, use the hostname parameter instead. User cannot use both IP and hostname together.
Use: Not required
JSON Schema:
Object type: string minLength: 2 maxLength: 45 pattern: [a-fA-F0-9:.]
The human-friendly name used to refer the client.
Use: Required
JSON Schema:
Object type: string minLength: 1 maxLength: 128 pattern: [A-Za-z0-9_.:-]
The hostname of the new client.
Note: Use this parameter if the client certificate is to be created with hostname. If the certificate is to be created with IP address, use the ip parameter instead. User cannot use both IP and hostname together.
Use: Not required
JSON Schema:
Object type: string minLength: 1 maxLength: 60 pattern: [A-Za-z0-9_.-]
The client identifier registered with the appliance. Response includes the URL to the client identifier to obtain additional information.
JSON Schema:
Object
client: Object
type: string
description: client is the name of the client registered with the appliance.
JSON Schema:
id: Object
type: string
see GET /api/lunasa/ntls/clients/{clientid}
User must include hostname or an IP.
If user has included both IP and hostname.
If any unexpected error occurs.
If client name is already registered to a client on this server.
If client IP is already registered to a client on this server.
If client hostname already registered to a client on this server.
If IP can not be used to register a client.
If hostname can not be used to register a client.
POST
https://1.2.3.4:8443//api/lunasa/ntls/clients
{
"ip": "1.2.3.4",
"clientName": "testClient",
"certificate": "-----BEGIN CERTIFICATE-----\n...<certificate>...\n-----END CERTIFICATE-----"
}
POST
https://1.2.3.4:8443//api/lunasa/ntls/clients
{
"ip": "1.2.3.4",
"clientName": "testClient"
}
{'Access-Control-Allow-Origin': '*', 'Content-Type': 'application/json', 'Location': 'api/lunasa/ntls/clients/testClient3', 'Content-Length': '2', 'Access-Control-Allow-Credentials': 'true'}
{
"client": "testClient"
}
This resource will require SO authentication when the forceSoLogin flag is enabled. (See GET /api/lunasa)