{"type":"api","title":"Get Top N","meta":{"id":"/apps/pubhub/media/cisco-catalyst-sd-wan-api-guide-20-18/1c4807bcb76af36988ebb37dc2e455b1787a155e/d2f02ba2-fd0d-3a26-bcc5-feafc8f24d17","info":{"title":"Monitoring and Troubleshooting","description":"Includes API operations for the following:\n- Real-time monitoring\n- Accessing statistics APIs and statistics bulk APIs\n- Retrieving device state\n- Managing alarms and events\n","contact":{"email":"vmanage@cisco.com"},"version":"20.18 - 2025-08-15"},"openapi":"3.1.0","servers":[{"url":"/dataservice"}]},"spec":{"tags":["Monitoring - Alarms Details"],"description":"Returns top-n alarm count based on given query","operationId":"getTopN","parameters":[{"name":"site-id","in":"query","description":"Specify the site-id to filter the alarms","schema":{"type":"string"}},{"name":"includeTenants","in":"query","description":"Specify whether the tenant alarms need to be visible or not from provider view.","schema":{"type":"boolean"}}],"requestBody":{"description":"Input query","content":{"application/json":{"schema":{"type":"object"},"examples":{"Topn by system IP":{"description":"Topn by system IP","value":{"query":{"field":"system_ip","condition":"AND","rules":[{"value":["24"],"field":"entry_time","type":"date","operator":"last_n_hours"},{"field":"active","operator":"in","type":"boolean","value":["true"]},{"field":"acknowledged","operator":"in","type":"boolean","value":["false"]}],"size":2}},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineRequestTopnBySystemip"},"Topn by host name":{"description":"Topn by host name","value":{"query":{"field":"host-name","condition":"AND","rules":[{"value":["24"],"field":"entry_time","type":"date","operator":"last_n_hours"},{"field":"active","operator":"in","type":"boolean","value":["true"]},{"field":"acknowledged","operator":"in","type":"boolean","value":["false"]}],"size":2}},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineRequestTopnByHostname"},"Topn by type":{"description":"Topn by type","value":{"query":{"field":"type","condition":"AND","rules":[{"value":["24"],"field":"entry_time","type":"date","operator":"last_n_hours"},{"field":"active","operator":"in","type":"boolean","value":["true"]},{"field":"acknowledged","operator":"in","type":"boolean","value":["false"]}],"size":2}},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineRequestTopnByType"},"Topn by severity":{"description":"Topn by severity","value":{"query":{"field":"severity","condition":"AND","rules":[{"value":["24"],"field":"entry_time","type":"date","operator":"last_n_hours"},{"field":"active","operator":"in","type":"boolean","value":["true"]},{"field":"acknowledged","operator":"in","type":"boolean","value":["false"]}],"size":2}},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineRequestTopnBySeverity"},"Topn by rule name display":{"description":"Topn by rule name display","value":{"query":{"field":"rule_name_display","condition":"AND","rules":[{"value":["24"],"field":"entry_time","type":"date","operator":"last_n_hours"},{"field":"active","operator":"in","type":"boolean","value":["true"]},{"field":"acknowledged","operator":"in","type":"boolean","value":["false"]}],"size":3}},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineRequestTopnByRulenamedisplay"}}}},"required":true},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object"},"examples":{"Topn by system IP":{"description":"Topn by system IP","value":{"data":[{"system_ip":"172.16.255.16","count":38,"devices":[{"system_ip":"172.16.255.16","host_name":"vm6","count":38}]},{"system_ip":"172.16.255.22","count":30,"devices":[{"system_ip":"172.16.255.22","host_name":"vm12","count":30}]},{"system_ip":"172.16.255.26","count":28,"devices":[{"system_ip":"172.16.255.26","host_name":"vm16","count":28}]}]},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineResponseTopnBySystemip"},"Topn by host name":{"description":"Topn by host name","value":{"data":[{"host-name":"vm6","count":38,"devices":[{"system_ip":"172.16.255.16","host_name":"vm6","count":38}]},{"host-name":"vm12","count":30,"devices":[{"system_ip":"172.16.255.22","host_name":"vm12","count":30}]},{"host-name":"vm16","count":28,"devices":[{"system_ip":"172.16.255.26","host_name":"vm16","count":28}]}]},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineResponseTopnByHostname"},"Topn by type":{"description":"Topn by type","value":{"data":[{"count":281,"devices":[{"host_name":"vm16","system_ip":"172.16.255.26","count":181},{"host_name":"vm12","system_ip":"172.16.255.22","count":100}],"type":"cpu-usage"},{"count":3,"devices":[{"host_name":"vm5","system_ip":"172.16.255.15","count":3}],"type":"node_down"}]},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineResponseTopnByType"},"Topn by severity":{"description":"Topn by severity","value":{"data":[{"count":127,"devices":[{"host_name":"vm16","system_ip":"172.16.255.26","count":60},{"host_name":"vm12","system_ip":"172.16.255.22","count":40},{"host_name":"vm5","system_ip":"172.16.255.15","count":27}],"severity":"Medium"},{"count":106,"devices":[{"host_name":"vm16","system_ip":"172.16.255.26","count":56},{"host_name":"vm12","system_ip":"172.16.255.22","count":50}],"severity":"Minor"}]},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineResponseTopnBySeverity"},"Topn by rule name display":{"description":"Topn by rule name display","value":{"data":[{"count":12,"devices":[{"count":7,"host_name":"vm12","system_ip":"172.16.255.22"},{"count":5,"host_name":"vm6","system_ip":"172.16.255.16"}],"rule_name_display":"Memory_Usage"},{"count":12,"devices":[{"count":4,"host_name":"vm10","system_ip":"172.16.255.20"},{"count":4,"host_name":"vm12","system_ip":"172.16.255.22"},{"count":4,"host_name":"vm9","system_ip":"172.16.255.19"}],"rule_name_display":"Root_Cert_Chain_Installed"},{"count":2,"devices":[{"count":2,"host_name":"vm12","system_ip":"172.16.255.22"}],"rule_name_display":"CRL_Has_Been_Disabled"}]},"$$ref":"#/components/examples/ComViptelaVmanageServerCorrelationEngineResponseTopnByRulenamedisplay"}}}}},"400":{"description":"Bad Request"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}},"method":"post","path":"/alarms/topn"}}