SNMP Trap Host   /rest/apv/admintools/snmp/SNMPServer

This configuration page is used to configure the SNMP hosts to which SNMP trap messages generated by the SNMP agent will be sent.

  • Relational-instance Queries:
  • GET
    /rest/apv/admintools/snmp/SNMPServer/trap_host
    Query the SNMP Trap Host info of the corresponding SNMP Trap Host.
    Normal response codes
    200(OK)
    Error response codes
    401(unauthorized), 403(access forbidden), 404(no such instance), 500(internal service error), 501(unimplemented)
    Request parameters
    Parameter Type Description
    instance_id URI ID of the instance
    Response format
    {
        "SNMPServer": {
            "instance_id":<instance_id>,
            "trap_host":[
               {
                <field1>:<value1>,
                <field2>:<value2>,
                ...
               }
            ]
        }
    }
                                
    Examples
  • POST
    /rest/apv/admintools/snmp/SNMPServer/trap_host
    Create a SNMP v1/v2 Trap Host for corresponding SNMP Trap Host
    Normal response codes
    200(successfully created)
    Error response codes
    401(unauthorized), 403(access forbidden), 500(internal service error), 501(unimplemented)
    Request format
            {
                <param1>:<value1>,
                <param2>:<value2>,
                ...
            }
                                        
    Request parameters
    Parameter Type Description
    ip ipaddr
    version_id enum Available values:
    • 1 (1) - SNMP v1
    • 2 (2) - SNMP v2
    community string Sets the SNMP community to which the SNMP trap host and the SNMP agent belong.
    Response format
            {
                "SNMPV1V2Servers": {
                    "instance_id":<instance_id>,
                    <param1>:<value1>,
                    <param2>:<value2>,
                    ...
                }
            }
                                        
    Response parameters
    Same as request parameters.
    Examples
  • DELETE
    /rest/apv/admintools/snmp/SNMPServer/trap_host/<snmpv1v2servers_id>
    Delete a specific SNMP v1/v2 Trap Host of corresponding snmpserver
    Normal response codes
    200(OK)
    Error response codes
    401(unauthorized), 403(access forbidden), 404(no such instance), 500(internal service error), 501(unimplemented)
    Response format
            {
                "msg": <success-or-error-msg>
            }
                                        
    Examples
  • POST
    /rest/apv/admintools/snmp/SNMPServer/trap_host
    Create a SNMP v3 Trap Host for corresponding SNMP Trap Host
    Normal response codes
    200(successfully created)
    Error response codes
    401(unauthorized), 403(access forbidden), 500(internal service error), 501(unimplemented)
    Request format
            {
                <param1>:<value1>,
                <param2>:<value2>,
                ...
            }
                                        
    Request parameters
    Parameter Type Description
    ip ipaddr
    version_id enum Available values:
    • 3 (3) - SNMP v3
    engine_id string Sets the engine ID of the SNMP trap host.
    username string Sets the username of the SNMP v3 user to receive the SNMP trap messages.
    level enum Available values:
    • authNopriv (authNopriv) - Communication requires authentication, but not privacy.
    • authPriv (authPriv) - Communication requires authentication and privacy.
    auth_password string
    priv_password string Sets the private password used for authorization.
    Response format
            {
                "SNMPV3Servers": {
                    "instance_id":<instance_id>,
                    <param1>:<value1>,
                    <param2>:<value2>,
                    ...
                }
            }
                                        
    Response parameters
    Same as request parameters.
    Examples
  • DELETE
    /rest/apv/admintools/snmp/SNMPServer/trap_host/<snmpv3servers_id>
    Delete a specific SNMP v3 Trap Host of corresponding snmpserver
    Normal response codes
    200(OK)
    Error response codes
    401(unauthorized), 403(access forbidden), 404(no such instance), 500(internal service error), 501(unimplemented)
    Response format
            {
                "msg": <success-or-error-msg>
            }
                                        
    Examples