{"type":"api","title":"Create/Update a Profile","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":{"description":"Argument passed in is the ProfileConfig. This requires to pass in the whole structure of this profile.\n pulse will check which parameter has been modified and take corresponding operations.\nArgument returned is the new created ProfResult.\nExample: curl -X PUT http://localhost:8000/v1/kpiprofilemgmt/write -d '{\"id\": \"cpuprofile_cc\",\"description\": \"cpu kpis 2\",\"kpis\": [ {\"kpiId\": \"pulse_cpu_utilization\",\"cadence\": 120,\"alerting\": true,\"downsample_factor\": 3}]}]}'","operationId":"CreateUpdateProfile","requestBody":{"content":{"application/json":{"schema":{"description":"A ProfileConfig consists of several ProfileKpiConfigs with an ID and name.","example":{},"properties":{"description":{"description":"Description of what this profile is for.","type":"array"},"id":{"description":"id","type":"array"},"kpis":{"description":"KPIs configured for this profile.","items":{"description":"ProfileKpiConfig is KPI of ID, Cadence, Alerting, Parameters for config.","properties":{"alerting":{"description":"alerting","format":"boolean","title":"Whether generate alerts or not","type":"array"},"cadence":{"description":"cadence","format":"int64","title":"KPI Cadence in seconds","type":"array"},"downsample_factor":{"description":"downsample_factor","format":"int64","title":"Downsampling rate: How many alerts coming in Cadence will be combined into 1 alert","type":"array"},"kpi_id":{"description":"kpi_id","title":"Pulse kpi ID","type":"array"},"kpi_scripts":{"description":"kpi_scripts","items":{"description":"Description for pulseKpiScript","properties":{"alert_template":{"description":"alert_template","title":"Alert Template used by the script","type":"string"},"parameters":{"description":"parameters","items":{"description":"Description for pulseParameter","properties":{"description":{"description":"description","type":"array"},"display_name":{"description":"display_name","type":"array"},"name":{"description":"name","type":"array"},"newValue":{"description":"newValue","type":"array"},"possible_values":{"description":"possible_values","items":{"type":"string"},"type":"array"},"type":{"description":"type","type":"array"},"value":{"description":"value","type":"array"}},"type":"object","$$ref":"#/components/schemas/pulseParameter"},"title":"Alerting Parameters","type":"object"},"script_id":{"description":"script_id","type":"string"}},"type":"object","$$ref":"#/components/schemas/pulseKpiScript"},"title":"Each kpi may have multiple scripts","type":"array"}},"type":"object","$$ref":"#/components/schemas/pulseProfileKpiConfig"},"type":"array"},"name":{"description":"Name of what this profile is for.","type":"array"}},"type":"object","$$ref":"#/components/schemas/pulseProfileConfig"}}},"description":"Argument passed in is the ProfileConfig.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Description for pulseProfResult","example":"profile_name","properties":{"result":{"description":"result","type":"string"}},"$$ref":"#/components/schemas/pulseProfResult"}}},"description":"ok"},"400":{"content":{"application/json":{"schema":{"description":"Description for error","example":"Internal Server Error","type":"string","$$ref":"#/components/schemas/error"}}},"description":"Bad Request"},"500":{"content":{"application/json":{"schema":{"description":"Description for error","example":"Internal Server Error","type":"string","$$ref":"#/components/schemas/error"}}},"description":"Internal Server Error"}},"summary":"Create/Update a Profile","tags":["KPI Profile Management"],"x-codegen-request-body-name":"body","__originalOperationId":"CreateUpdateProfile","security":[{"bearerAuth":[]}],"method":"put","path":"/kpiprofilemgmt/write"}}