{"type":"api","title":"To associate remediation with a KPI","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":"Link","requestBody":{"content":{"application/json":{"schema":{"description":"Description for link","example":{"kpi":[{"kpi_id":"pulse_interface_rate_counters","kpi_name":"Interface rate counter","remediation":[{"automatic":true,"body":{"check_start_time":0,"devices":{"ids":["{{ index .Content `Producer` }}"]},"exec_start_time":0,"execution_params":{"1":{"retry_count":"3","retry_interval":"5s"},"2":{"config":{"tailf-ned-cisco-ios-xr:interface":{"GigabitEthernet":[{"id":"{{ index .Content `interface-name` }}"}],"HundredGigE":[{"id":"{{ index .Content `interface-name` }}"}],"Loopback":[{"id":"{{ index .Content `interface-name` }}"}],"TenGigE":[{"id":"{{ index .Content `interface-name` }}"}],"TwoHundredGigE":[{"id":"{{ index .Content `interface-name` }}"}]}}}},"mop_id":"router_op_interface_state_xr","mop_name":"Interface State change on XR","name":"{{ index .Content `RemName` }}","tags":["{{ index .Content `RemTags` }}"],"wae_threshold":"90"},"level":"WARNING","url":"/crosswork/nca/v1/mopjobs","user":"admin"}]}]},"properties":{"kpi":{"description":"kpi","items":{"description":"Description for link_kpi","properties":{"kpi_id":{"description":"KPI Id to which remediation is being associated.","type":"string"},"kpi_name":{"description":"Name of the KPI Id to which remediation is being associated.","type":"string"},"remediation":{"description":"remediation","type":"object","properties":{"automatic":{"description":"automatic","type":"string"},"body":{"description":"body","properties":{},"type":"object"},"level":{"description":"level","type":"string"},"url":{"description":"url","type":"string"},"user":{"description":"user","type":"string"}},"title":"for alert level remediation","$$ref":"#/components/schemas/pulseAlertRemediation"}},"type":"object","$$ref":"#/components/schemas/link_kpi"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/link"}}},"description":"Associate Remediation with a KPI","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Description for link","example":{"kpi":[{"kpi_id":"pulse_interface_rate_counters","kpi_name":"Interface rate counter","remediation":[{"automatic":true,"body":{"check_start_time":0,"devices":{"ids":["{{ index .Content `Producer` }}"]},"exec_start_time":0,"execution_params":{"1":{"retry_count":"3","retry_interval":"5s"},"2":{"config":{"tailf-ned-cisco-ios-xr:interface":{"GigabitEthernet":[{"id":"{{ index .Content `interface-name` }}"}],"HundredGigE":[{"id":"{{ index .Content `interface-name` }}"}],"Loopback":[{"id":"{{ index .Content `interface-name` }}"}],"TenGigE":[{"id":"{{ index .Content `interface-name` }}"}],"TwoHundredGigE":[{"id":"{{ index .Content `interface-name` }}"}]}}}},"mop_id":"router_op_interface_state_xr","mop_name":"Interface State change on XR","name":"{{ index .Content `RemName` }}","tags":["{{ index .Content `RemTags` }}"],"wae_threshold":"90"},"level":"WARNING","url":"/crosswork/nca/v1/mopjobs","user":"admin"}]}]},"properties":{"kpi":{"description":"kpi","items":{"description":"Description for link_kpi","properties":{"kpi_id":{"description":"KPI Id to which remediation is being associated.","type":"string"},"kpi_name":{"description":"Name of the KPI Id to which remediation is being associated.","type":"string"},"remediation":{"description":"remediation","type":"object","properties":{"automatic":{"description":"automatic","type":"string"},"body":{"description":"body","properties":{},"type":"object"},"level":{"description":"level","type":"string"},"url":{"description":"url","type":"string"},"user":{"description":"user","type":"string"}},"title":"for alert level remediation","$$ref":"#/components/schemas/pulseAlertRemediation"}},"type":"object","$$ref":"#/components/schemas/link_kpi"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/link"}}},"description":"OK"},"201":{"content":{"application/json":{"schema":{"description":"Description for link","example":{"kpi":[{"kpi_id":"pulse_interface_rate_counters","kpi_name":"Interface rate counter","remediation":[{"automatic":true,"body":{"check_start_time":0,"devices":{"ids":["{{ index .Content `Producer` }}"]},"exec_start_time":0,"execution_params":{"1":{"retry_count":"3","retry_interval":"5s"},"2":{"config":{"tailf-ned-cisco-ios-xr:interface":{"GigabitEthernet":[{"id":"{{ index .Content `interface-name` }}"}],"HundredGigE":[{"id":"{{ index .Content `interface-name` }}"}],"Loopback":[{"id":"{{ index .Content `interface-name` }}"}],"TenGigE":[{"id":"{{ index .Content `interface-name` }}"}],"TwoHundredGigE":[{"id":"{{ index .Content `interface-name` }}"}]}}}},"mop_id":"router_op_interface_state_xr","mop_name":"Interface State change on XR","name":"{{ index .Content `RemName` }}","tags":["{{ index .Content `RemTags` }}"],"wae_threshold":"90"},"level":"WARNING","url":"/crosswork/nca/v1/mopjobs","user":"admin"}]}]},"properties":{"kpi":{"description":"kpi","items":{"description":"Description for link_kpi","properties":{"kpi_id":{"description":"KPI Id to which remediation is being associated.","type":"string"},"kpi_name":{"description":"Name of the KPI Id to which remediation is being associated.","type":"string"},"remediation":{"description":"remediation","type":"object","properties":{"automatic":{"description":"automatic","type":"string"},"body":{"description":"body","properties":{},"type":"object"},"level":{"description":"level","type":"string"},"url":{"description":"url","type":"string"},"user":{"description":"user","type":"string"}},"title":"for alert level remediation","$$ref":"#/components/schemas/pulseAlertRemediation"}},"type":"object","$$ref":"#/components/schemas/link_kpi"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/link"}}},"description":"Created"},"500":{"content":{"application/json":{"schema":{"description":"Description for error","example":"Internal Server Error","type":"string","$$ref":"#/components/schemas/error"}}},"description":"Internal Server Error"}},"summary":"To associate remediation with a KPI","tags":["Remediation"],"x-codegen-request-body-name":"body","__originalOperationId":"Link","security":[{"bearerAuth":[]}],"method":"post","path":"/kpimgmt/link"}}