![]() |
REST API
17
REST API for Luna Network HSMs
|
This resource creates a new SNMP trap agent.
Users with the following role privileges can perform this command:
Specifies the trap host name or IP address.
Use: Required
JSON Schema:
Object
type:string
minLength: 1
maxLength: 64
pattern: ^((?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9]))|((?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4})|([a-zA-Z0-9]([a-zA-Z0-9.-]{0,62}[a-zA-Z0-9])?)$
Specifies the name of the user.
Use: Required
JSON Schema:
Object
type:string
minLength: 1
maxLength: 31
pattern: ^[a-zA-Z0-9_-]*$
Specifies the engine that receives notifications and that has the authority to control the flow of information. Note: This value represents a hexadecimal value with a length of 10, 12, 14 or 16 (excluding the prepended 0x value).
Use: Required
JSON Schema:
Object
type:string
minLength: 10
maxLength: 64
pattern: ^[0-9a-fA-F]{10}$|^[0-9a-fA-F]{12}$|^[0-9a-fA-F]{14}$|^[0-9a-fA-F]{16}$
Specifies the SNMP v3 Authentication password.
Use: Required
JSON Schema:
Object
type:string
minLength: 8
maxLength: 128
pattern: [a-zA-Z0-9_ \$\(\)\[\]\{\}\*\+\.\/\^!#%,:=@~?'-]*$
Specifies the SNMP v3 Authentication Protocol. Note: Restricted to SHA.
Use: Required
JSON Schema:
Object
type:string
minLength: 3
maxLength: 3
pattern: ^(SHA)$
Specifies the SNMP v3 Privacy Password.
Use: Required
JSON Schema:
Object
type:string
minLength: 8
maxLength: 128
pattern: [a-zA-Z0-9_ \$\(\)\[\]\{\}\*\+\.\/\^!#%,:=@~?'-]*$
Specifies the SNMP v3 Privacy protocol. Note: Restricted to AES.
Use: Required
JSON Schema:
Object
type:string
minLength: 3
maxLength: 3
pattern: ^(AES)$
Specify trap to record all sending attempts as successful. By default (inform), the appliance waits for a response from the target server before recording that the trap was sent successfully.
Use: Required
JSON Schema:
Object
type:string
minLength: 4
maxLength: 6
pattern: ^(trap|inform)$
The newly created trap ID.
JSON Schema:
type: string
example: 192.168.1.100
"Location" is the URL to the newly created snmp trap.
see GET /api/lunasa/snmp/traps/{trapid}
Returned when the input data does not conform to the required validation schema.
No session cookie was found.
SNMP trap to be configured already exists.
Failed to perform the specified operation.
POST
https://1.2.3.4:8443/api/lunasa/snmp/trap
{
"address": "192.168.1.100",
"securityName": "snmpUser1",
"authenticationProtocol": "SHA",
"authenticationPassword": "AuthPassw0rd!",
"privacyProtocol": "AES",
"privacyPassword": "PrivPassw0rd!",
"engineId": "0011223344",
"trapType": "trap"
}
{
"trapId": "192.168.1.100"
}