NVIDIA UFM Enterprise REST API Guide

Events Policy REST API

  • Description – these interfaces are used for retrieving information on and updating existing event policies in UFM

  • Request URL – /ufmRest/app/events_policy

  • Main operationsGet all events policiesGet an events policy using its IDUpdate a specific events policy

Get All Events Policies

  • Description – retrieve information on all events policies in UFM

  • Request URL – GET /ufmRest/app/events_policy/

  • Request Content Type – Application/json

  • Request Data – N/A

  • Response 

    {
        "133": {
            "severity": "Minor", 
            "to_snmp": false, 
            "use_alarm": true, 
            "threshold": 10.0, 
            "to_syslog": false, 
            "policy_object": "Port", 
            "duration": 300, 
            "to_ui": true, 
            "to_mail": false, 
            "call_script": false, 
            "to_log": true, 
            "description": "Port Normalized Transmit Wait",
            "action":"Isolated"
        }, 
        "130": {
            "severity": "Minor", 
            "to_snmp": false, 
            "use_alarm": true, 
            "threshold": 1.0, 
            "to_syslog": false, 
            "policy_object": "Port", 
            "duration": 0, 
            "to_ui": true, 
            "to_mail": false, 
            "call_script": false, 
            "to_log": true, 
            "description": "Non-optimal link width"
        }
    }
    
  • Possible Filters – may be used to filter the request:

    • ids – retrieves information on events policies per ID
      Example: 

      GET /ufmRest/app/events_policy?ids=133,135
      
  • Status Codes200 – OK

Get Events Policy

  • Description – retrieve information on an events policy using its ID

  • Request URL – GET /ufmRest/app/events_policy/<policy_id>

  • Request Content Type – Application/json

  • Request Data – N/A

  • Response

    {
        "severity": "Minor", 
        "to_snmp": false, 
        "use_alarm": true, 
        "threshold": 10.0, 
        "to_syslog": false, 
        "policy_object": "Port", 
        "duration": 300, 
        "to_ui": true, 
        "to_mail": false, 
        "call_script": false, 
        "to_log": true, 
        "description": "Port Normalized Transmit Wait",
        "action":"Isolated"
    }
    
  • Status Codes200 – OK

Update Events Policy

  • Description – update an existing events policy using its ID

  • Request URL – PUT /ufmRest/app/events_policy/<policy_id>

  • Request Content Type – Application/json

  • Request Data 

    {
      "duration": 10,
      "to_log": true,
      "to_syslog": true,
      "to_snmp": true,
      "to_ui": true,
      "to_mail": true,
      "use_alarm": true,
      "threshold": 10,
      "call_script":true,
      "severity": "Warning",
      "action": "Isolated"
    }
    
  • Response – N/A

  • Status Codes200 – OK400 – BAD REQUEST

Update Events Policies

  • Description – update multiple existing event policies

  • Request URL  – PATCH /ufmRest/app/events_policy

  • Request Content Type – Application/json

  • Request Data

    [
    {
    "name": "64",
    "to_log": true,
    "to_mail": false,
    "to_snmp": false,
    "to_syslog": false,
    "to_ui": true,
    "use_alarm": false
    },
    {
    "name": "65",
    "to_log": true,
    "to_mail": false,
    "to_snmp": false,
    "to_syslog": false,
    "to_ui": true,
    "use_alarm": true
    },
    {
    "name": "66",
    "to_log": true,
    "to_mail": false,
    "to_snmp": false,
    "to_syslog": false,
    "to_ui": true,
    "use_alarm": false
    }
    ]
    
  • Response – N/A

  • Status Codes200 – OK400 – BAD REQUEST


Last updated: