{"type":"api","title":"To remediate an alerting 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":"Remediate","requestBody":{"content":{"application/json":{"schema":{"description":"Description for remediation","example":{"alerts":[{"context_json":{"interface-name":"TenGigE0/0/0/0"}}],"device_id":"xrv9k-15-215","kpi_id":"pulse_interface_flap_detector","levels":[{"level":"CRITICAL"}],"time_ago":"0m","time_interval":"1h"},"properties":{"URL":{"description":"URL for the NCA Playbook for this remediation.","type":"array"},"body":{"description":"Bytes array containing the NCA playbook parameters for this remediation.","format":"byte","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","type":"array"}},"type":"object","$$ref":"#/components/schemas/remediation"}}},"description":"Specify parameters to remediate an alerting KPI","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Description for remediate","example":{"devices":{"device":[{"device_id":"xrv9k-15-215","kpis":{"kpi":[{"kpi_id":"pulse_interface_flap_detector","kpi_name":"Interface flap detection","remediation":[{"automatic":true,"body":"{\"check_start_time\":0,\"devices\":{\"ids\":[\"\\u003cno\",\"value\\u003e\"]},\"exec_start_time\":0,\"execution_params\":{\"1\":{\"retry_count\":\"3\",\"retry_interval\":\"5s\"},\"2\":{\"config\":{\"tailf-ned-cisco-ios-xr:interface\":{\"GigabitEthernet\":[{\"id\":\"[TenGigE0/0/0/0 HundredGigE1/2/3]\",\"shutdown\":null}],\"HundredGigE\":[{\"id\":\"[TenGigE0/0/0/0 HundredGigE1/2/3]\",\"shutdown\":null}],\"Loopback\":[{\"id\":\"[TenGigE0/0/0/0 HundredGigE1/2/3]\",\"shutdown\":null}],\"TenGigE\":[{\"id\":\"[TenGigE0/0/0/0 HundredGigE1/2/3]\",\"shutdown\":null}],\"TwoHundredGigE\":[{\"id\":\"[TenGigE0/0/0/0 HundredGigE1/2/3]\",\"shutdown\":null}]}}}},\"mop_id\":\"router_op_interface_state_xr\",\"mop_name\":\"Interface State change on XR\",\"name\":\"\\u003cno value\\u003e\",\"tags\":[\"\\u003cno value\\u003e\"],\"wae_threshold\":\"90\"}","level":"CRITICAL","url":"/crosswork/nca/v1/mopjobs","user":"admin"}]}]}}]},"filtered_count":0,"total_count":0},"properties":{"device_id":{"description":"Device Name for which remediation is being requested.","type":"array"},"kpi_id":{"description":"KPI Id for which remediation is being requested.","type":"array"},"levels":{"description":"levels","properties":{"level":{"description":"level","items":{"description":"Description for level","properties":{"level":{"description":"Alert levels to be considered for remediation. Valid values include CRITICAL,WARNING,INFO,OK","type":"array"}},"type":"object","$$ref":"#/components/schemas/level"},"type":"array"}},"type":"array"},"time_ago":{"description":"Start time of the Time period in terms of minutes(m) or hours(h)\ne.g if time_ago = 4 then the api wil consider alerts that came in prior to last 4hours\nDefault is now","type":"string"},"time_interval":{"description":"Specifies the length of the time period in terms of hours or minutes\ne.g. if timeInterval = 12h, the query will consider all alerts for past 12 hours and so on\nDefault is 1h","type":"string"}},"type":"object","$$ref":"#/components/schemas/remediate"}}},"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":"To remediate an alerting KPI","tags":["Remediation"],"x-codegen-request-body-name":"body","__originalOperationId":"Remediate","security":[{"bearerAuth":[]}],"method":"post","path":"/alerts/remediation"}}