Product Documentation

Adding SNMP Users

Oct 21, 2015

SNMP users must be associated with a SNMP view. Therefore, first check if the required SNMP view is already available and then add the SNMP user.

  1. Get the list of configured SNMP views.
    • Request:

      HTTP Method
      GET
      URL
      https://<cb_ip>/cb/nitro/v1/config/snmp_view
      Request Headers
      Authorization: Basic <base64 encoded(username:password)>
    • Response:

      HTTP Status Code on Success
      200 OK
      HTTP Status Code on Failure
      4xx <string> or 5xx <string>. The response provides details of the error. See Error Handling.
      Response Header
      Content-Type: application/vnd.com.citrix.cloudbridge.snmp_view_list+json
      Response Payload
      { 
          "snmp_view": 
          [ 
              ... 
              ... 
          ] 
      }
      Note: If the required SNMP view is available in the response payload, then skip to step 3. Else, add the required SNMP as shown in step 2.
  2. Add the required SNMP view.
    • Request:

      HTTP Method
      POST
      URL
      https://<cb_ip>/cb/nitro/v1/config/snmp_view
      Request Headers
      Authorization: Basic <base64 encoded(username:password)> 
      Content-Type: application/vnd.com.citrix.cloudbridge.snmp_view+json
      Request Payload
      { 
          "snmp_view": 
          { 
              "name":"view1", 
              "subtree":"1.1", 
              "include":"true" 
          } 
      }
    • Response:

      HTTP Status Code on Success
      201 Created
      HTTP Status Code on Failure
      4xx <string> or 5xx <string>. The response provides details of the error. See Error Handling.
  3. Add the SNMP user.
    • Request:

      HTTP Method
      POST
      URL
      https://<cb_ip>/cb/nitro/v1/config/snmp_user
      Request Headers
      Authorization: Basic <base64 encoded(username:password)> 
      Content-Type: application/vnd.com.citrix.cloudbridge.snmp_user+json
      Request Payload
      { 
          "snmp_user": 
          { 
              "username":"snmp_user1", 
              "authprotocol":"MD5", 
              "authpassword":"password", 
              "viewname":"view1" 
          } 
      }
    • Response:

      HTTP Status Code on Success
      201 Created
      HTTP Status Code on Failure
      4xx <string> or 5xx <string>. The response provides details of the error. See Error Handling.