REST API  17
REST API for Luna Network HSMs
PATCH /api/lunasa/snmp/users/{userid}/notifications/{notificationid}

PATCH /api/lunasa/snmp/users/{userid}/notifications/{notificationid}

This resource is used to partially update the information of an snmp notification.

User Privileges

Users with the following role privileges can perform this command:

  • admin
  • operator

Parameters

userid

Specifies the user.

Use: Required

JSON Schema:

    Object
    type:string
    minLength: 1
    maxLength: 31
    pattern: ^[a-zA-Z0-9_-]*$

notificationid

Specifies the notification.

Use: Required

JSON Schema:

    Object
    type:string

engineId

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), if the notification type specified is of type inform this parameter will not be required.

Use: Not 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}$

authenticationPassword

Specifies and confirms the password used to authenticate SNMPv3 notification messages.

Use: Not Required

JSON Schema:

    Object
    type:string
    minLength: 8
    maxLength: 128
    pattern: [a-zA-Z0-9_ \$\(\)\[\]\{\}\*\+\.\/\^!#%,:=@~?'-]*$

authenticationProtocol

Specifies the HMAC (hash-based message authentication code) algorithm used to authenticate SNMPv3 notification messages. Default value is SHA.

Use: Not Required

JSON Schema:

    Object
    type:string
    minLength: 3
    maxLength: 3
    pattern: ^(SHA)$

privacyPassword

Specifies and confirms the password used to encrypt SNMPv3 notification messages.

Use: Not Required

JSON Schema:

    Object
    type:string
    minLength: 8
    maxLength: 128
    pattern: [a-zA-Z0-9_ \$\(\)\[\]\{\}\*\+\.\/\^!#%,:=@~?'-]*$

privacyProtocol

Specifies the algorithm used to encrypt SNMPv3 notification messages. Default vlaue is AES.

Use: Not Required

JSON Schema:

    Object
    type:string
    minLength: 3
    maxLength: 3
    pattern: ^(AES)$

type

Specifies the notification type. Valid values: trap: one-way unconfirmed notification inform: confirmed notification with retries Default: trap

Use: Not Required

JSON Schema:

    Object
    type:string
    minLength: 4
    maxLength: 6
    pattern: ^(trap|inform)$

Responses

204

Success.

400

FRAMEWORK_BAD_REQUEST

Returned when the input data does not conform to the required validation schema.

401

FRAMEWORK_NO_SESSION_COOKIE

No session cookie was found.

404

SNMP_USER_DOES_NOT_EXIST

SNMP user specified does not exist.

404

SNMP_USER_NOTIFICATION_DOES_NOT_EXIST

The SNMP notification does not exist.

500

SNMP_OPERATION_FAILED

Failed to perform the specified operation.

Example Request

    PATCH
    https://1.2.3.4:8443/api/lunasa/snmp/users/myUser/notifications/1.2.3.10_1234
    {
        "authenticationPassword": "password2",
        "privacyPassword": "password2",
        "authenticationProtocol": "SHA",
        "privacyProtocol": "AES",
        "type": "trap",
        "engineId": "1234567890"
    }

Example Response

{
}