Enabling an agent using the REST API

Instructions and examples in this document use an IP address that is reserved for documentation, 192.0.2.5, as an example of the IP address for the switch. To access your switch, you must use the IP address or hostname of that switch.

Prerequisites
  • You must be logged in to the switch REST API with a user name that has administrator rights.

  • The switch REST API access mode must be read-write.

Procedure
  • To enable the agent at the time the agent is created, set the disabled parameter to false when you create the agent.

    For example:

    POST https://192.0.2.5/rest/v1/system/nae_scripts/com.arubanetworks.bgp_monitor/nae_agents
    {
        "name": "com.arubanetworks.bgp_monitor.Agent1",
        "disabled":false,
        "parameters_values":{
                 "threshold":"10"
         }
    }
  • To enable an existing agent, use the PUT method to set the disabled parameter to false.

    For example:

    PUT https://192.0.2.5/rest/v1/system/nae_scripts/com.arubanetworks.bgp_monitor/nae_agents/com.arubanetworks.bgp_monitor.Agent1
    {
         "disabled":false,
         "parameters_values":{
               "threshold":"10"
          }
    }