{"type":"api","title":"Get the definition of KPIs","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/280afeb1-5ea4-33e3-8618-f92d3ecedf8f","info":{"contact":{"email":"support@cisco.com","name":"Crosswork Team, Cisco"},"description":"Health Insights(HI) is a software system that provides smart KPI monitoring and remediation for service provider networks. This document contains details of the HI RESTful APIs that can be used to manage KPIs, enable/disable KPIs on groups or devices, query KPIs and device alerts, remediate alerting KPIs etc.","license":{"name":"Cisco Software License Agreement","url":"https://www.cisco.com/public/sw-license-agreement.html"},"title":"Crosswork Health Insights API","version":"7.1.0"},"security":[{"bearerAuth":[]}],"x-parser-conf":{"overview":{"markdownPath":"reference/CAHI/health_insights_overview.md"}},"openapi":"3.0.1","servers":[{"url":"https://{server_ip}:30603/crosswork/hi/v1","description":"Generated server url"}],"securitySchemes":{"bearerAuth":{"description":"token","in":"header","name":"Authorization","type":"apiKey"}}},"spec":{"operationId":"Getkpis","requestBody":{"content":{"application/json":{"schema":{"description":"Description for query_kpis","example":{"descending_order":false,"filter":{"category":"user","kpi_name":"bgp","summary":"monitors"},"kpis":["pulse_cpu_utilization"],"limit":1,"offset":0,"sort_field":"details"},"properties":{"descending_order":{"description":"Specifies the sort order","type":"boolean"},"filter":{"additionalProperties":{"type":"string"},"description":"Map of \u003cstring,string\u003e","type":"object"},"kpis":{"description":"Array of strings that specify kpi ids to be queried","items":{"type":"string"},"type":"array"},"limit":{"description":"Specifies number of records to be fetched in each API call","type":"integer"},"offset":{"description":"For pagination, specify the offset while fetching records. e.g.: if limit is 10, then in the first API call offset will be 0, in the 2nd call offset=10, 3rd call offset=20 etc","type":"integer"},"sort_field":{"description":"Specifies the sort field","type":"string"}},"type":"object","$$ref":"#/components/schemas/query_kpis"}}},"description":"Specify filters to query KPIs","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Description for kpis","properties":{"kpi":{"description":"kpi","items":{"description":"Description for kpi","example":{"alert_outputs":{"alert_output":[{"alert_tag":"operation-id"},{"alert_tag":"Producer"}]},"category":"CPU","created_by":"admin","creation_date":1589348271,"dashboards":{"dashboard":[{"type":"jsonfile","value":"Pulse-cpu-utilization-summary.json"},{"type":"jsonfile","value":"Pulse-cpu-utilization-raw.json"}]},"details":"Monitor CPU usage across RP and linecards on routers. Alert will be generated when CPU utilization exceeds thresholds.","kpi_id":"cpu-util","kpi_name":"CPU utilization","last_updated_by":"admin","last_updation_date":1589436774,"module_and_revision":"Cisco-IOS-XR-man-ipsla-oper:2015-11-09","scripts":{"script":[{"parameters":{"parameter":[{"display_name":"Alert Threshold","name":"alert_threshold","type":"float","value":"2.0"}]},"script":"script_string","script_id":"cpu_util_alert_template.json"}]},"sensor_groups":{"sensor_group":[{"cadence":{"default":60,"increment":10,"max":900,"min":10},"sensor_paths":{"sensor_path":[{"path_id":"Cisco-IOS-XR-man-ipsla-oper:ipsla/operation-data/operations/operation/statistics/latest/target/specific-stats/udp-jitter-stats/jitter-in"},{"path_id":"Cisco-IOS-XR-man-ipsla-oper:ipsla/operation-data/operations/operation/statistics/latest/target/specific-stats/udp-jitter-stats/jitter-out"}]}}]},"sensor_type":"YANG_MDT","summary":"Monitor CPU usage across RP and linecards on routers"},"properties":{"cadence":{"description":"Cadence for telemetry data collection in minutes.","type":"array"},"category":{"description":"KPI category","type":"array"},"createdBy":{"description":"createdBy","type":"array"},"creationDate":{"description":"creationDate","format":"int64","type":"array"},"dashboards":{"description":"dashboards","properties":{"dashboard":{"description":"dashboard","items":{"description":"Description for dashboard","example":{"type":["jsonfile"],"value":["Pulse-cpu-utilization-summary.json"]},"properties":{"type":{"description":"Type of reference to Grafana dashboard","type":"array"},"value":{"description":"Reference to Grafana Dashboard","type":"array"}},"required":["type","value"],"type":"object","$$ref":"#/components/schemas/dashboard"},"type":"array"}},"type":"array"},"details":{"description":"Detailed description of the KPI","type":"array"},"kpi_id":{"description":"KPI identifier","type":"array"},"kpi_name":{"description":"KPI display name","type":"array"},"lastUpdatedBy":{"description":"lastUpdatedBy","type":"array"},"lastUpdationDate":{"description":"lastUpdationDate","format":"int64","type":"array"},"paths":{"description":"paths","properties":{"path":{"description":"path","items":{"description":"Description for path","properties":{"cadence":{"$ref":"#/components/schemas/cadence","description":"cadence","type":"array"},"path":{"description":"KPI sensor path","type":"array"},"spec":{"description":"spec","properties":{"fields":{"description":"fields","items":{"description":"Description for field","properties":{"name":{"description":"Name of a sensor path field","type":"array"},"tag":{"description":"To indicate if field 'name' is a tag. Default is false.","type":"array"}},"required":["name"],"type":"object","$$ref":"#/components/schemas/field"},"type":"array"}},"type":"array"}},"type":"object","$$ref":"#/components/schemas/path"},"type":"array"}},"type":"array"},"scripts":{"description":"scripts","properties":{"script":{"description":"script","items":{"description":"Description for script","properties":{"parameters":{"description":"parameters","type":"array","example":{"parameter":[{"display_name":"Alert Threshold","name":"alert_threshold","value":"40.0"},{"display_name":"Alert Critical Time","name":"alert_crit_time","value":"0.0"}]},"properties":{"parameter":{"description":"parameter","items":{"description":"Description for parameter","example":{"display_name":"Alert Threshold","name":"alert_threshold","possible_values":["MINOR","MAJOR","WARNING","CRITICAL"],"value":"2.0"},"properties":{"display_name":{"description":"Readable name of the KPI parameter to be displayed to the user","type":"string"},"name":{"description":"Internal name of the KPI parameter used in the backend, used in other REST calls","type":"string"},"possible_values":{"description":"Array of strings that define the possible vaues for this parameter. If this array is not empty, it should be used as the list of options to the user for this parameter","items":{"type":"string"},"type":"array"},"type":{"description":"Type of parameter, e.g. string, int, float","type":"string"},"value":{"description":"Value of the parameter","type":"string"}},"type":"object","$$ref":"#/components/schemas/parameter"},"type":"array"}},"$$ref":"#/components/schemas/parameters"},"script":{"description":"Script","readOnly":true,"type":"array"},"script_id":{"description":"script ID in the form of script_name.json","type":"array"}},"type":"object","$$ref":"#/components/schemas/script"},"type":"array"}},"type":"array"},"sensor_groups":{"description":"sensor_groups","properties":{"sensor_group":{"description":"Support only one sensor group.","items":{"description":"Description for define_sensor_group","properties":{"cadence":{"$ref":"#/components/schemas/cadence","description":"cadence","type":"array"},"sensor_paths":{"description":"sensor_paths","properties":{"sensor_path":{"description":"sensor_path","items":{"properties":{"path_id":{"description":"Path identifier.","type":"string"}},"type":"object"},"type":"array"}},"type":"array"}},"type":"object","$$ref":"#/components/schemas/define_sensor_group"},"type":"array"}},"type":"array"},"summary":{"description":"Brief one-liner description of the KPI","type":"array"}},"required":["category","details","kpi_id","kpi_name","paths","summary"],"type":"object","$$ref":"#/components/schemas/kpi"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/kpis"}}},"description":"OK"},"500":{"content":{"application/json":{"schema":{"description":"Description for error","example":"Internal Server Error","type":"string","$$ref":"#/components/schemas/error"}}},"description":"Internal Server Error"}},"summary":"Get the definition of KPIs","tags":["KPI Management"],"x-codegen-request-body-name":"body","__originalOperationId":"Getkpis","security":[{"bearerAuth":[]}],"method":"post","path":"/kpimgmt/query"}}