{"type":"api","title":"Get recommended KPIs for a device","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":"RecommendKPIs","parameters":[{"description":"Device identifier","in":"path","name":"device_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"example":"[ kpi_id, kpi_name, category, summary, details, paths ]","properties":{"kpis":{"description":"kpis","properties":{"kpi":{"description":"kpi","items":{"properties":{"category":{"description":"KPI category","type":"string"},"details":{"description":"Detailed description of the KPI","type":"string"},"formula":{"description":"(Optional) KPI formula encoded in base64","type":"string"},"kpi_id":{"description":"KPI identifier","type":"string"},"kpi_name":{"description":"KPI display name","type":"string"},"paths":{"description":"paths","properties":{"path":{"description":"path","items":{"description":"Description for path","properties":{"cadence":{"description":"cadence","example":{"default":5,"increment":1,"max":30,"min":1},"properties":{"default":{"$ref":"#/components/schemas/cadence","description":"default","type":"array"},"increment":{"description":"Increment between cadences to use. If 0, can be ignored.","type":"array"},"max":{"description":"Maximum cadence for telemetry. Expect to always be defined.","type":"array"},"min":{"description":"Minimum cadence, expect to always be defined.","type":"array"}},"required":["default","max","min"],"type":"array","$$ref":"#/components/schemas/cadence"},"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":"object"},"recommend":{"description":"A value of 'true' indicates that this KPI is recommended","type":"boolean"},"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":"object"},"summary":{"description":"Brief one-liner description of the KPI","type":"string"}},"required":["category","details","kpi_id","kpi_name","paths","summary"],"type":"object"},"type":"array"}},"type":"object"}},"type":"object"}}},"description":"OK"},"404":{"content":{},"description":"Not Found."},"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 recommended KPIs for a device.","tags":["RecommendKPIs"],"__originalOperationId":"RecommendKPIs","security":[{"bearerAuth":[]}],"method":"get","path":"/recommendation/kpi/devices/{device_id}"}}