{"type":"api","title":"Create a config profile","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/42552ab7-d679-37b0-afe0-7313ad2e8c01","info":{"title":"Service Health Heuristic Packages APIs","description":"APIs for requesting rule and metric data stored by the Crosswork Service Health application.","termsOfService":"terms-of-service","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"},"version":"7.1.0"},"security":[{"bearerAuth":[]}],"x-parser-conf":{"overview":{"markdownPath":"reference/ServiceHealth/sh_heuristic_packages_overview.md"}},"openapi":"3.0.1","servers":[{"url":"/crosswork/aa/hpmgr"}],"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Security token for authorizing requests for these APIs.","name":"Authorization","in":"header"}}},"spec":{"tags":["AaHeuristicPackage"],"summary":"Create a config profile.","operationId":"AaHeuristicPackage_CreateConfigProfile","requestBody":{"description":"The RuleConfigProfile parameter.","content":{"application/json":{"schema":{"type":"object","description":"ConfigP rofile","properties":{"id":{"type":"string","description":"ID of ConfigProfile"},"name":{"type":"string","description":"Name of ConfigProfile"},"namespace":{"type":"string","description":"Namespace of ConfigProfile"},"description":{"type":"string","description":"Description of ConfigProfile"},"rules":{"type":"array","description":"Rules of ConfigProfile","items":{"type":"object","description":"RuleConfig Profile Candidate Rule","properties":{"name":{"type":"string","description":"Name of RuleConfigProfileCandidateRule"},"namespace":{"type":"string","description":"Namespace of RuleConfigProfileCandidateRule"}},"$$ref":"#/components/schemas/RuleConfigProfileCandidateRule"}},"values":{"description":"Subservices can potentially inherit multiple profiles when they are shared across different services. 'Precedence' determines which profile should be adopted by the Subservice. The key is the name of the config parameter (for example: the name of the Threshold constant). The key should be given in ALL CAPS.","type":"object","additionalProperties":{"type":"object","description":"RuleConfig Profile Config Param","properties":{"description":{"description":"The ruleConfig Description to be displayed in the Crosswork UI","type":"string"},"ui_tag":{"description":"UI tag will determine whether the constant needs to be displayed in the UI","type":"boolean"},"type":{"type":"string","description":"Config Param Type","default":"VAL_UNKNOWN","enum":["VAL_UNKNOWN","VAL_INT","VAL_FLOAT","VAL_STRING"],"$$ref":"#/components/schemas/ConfigParamType"},"int_val":{"type":"object","description":"Config Param Int value","properties":{"unit":{"type":"string","description":"Unit type","default":"NA","enum":["NA","MBPS","MSEC","USEC","SEC","PERCENT","GB","BYTES"],"$$ref":"#/components/schemas/UnitType"},"val":{"type":"string","description":"The type could be int and the unit could be millisecond.","format":"int64"}},"$$ref":"#/components/schemas/ConfigParamIntVal"},"float_val":{"type":"object","description":"Config Param Float value","properties":{"unit":{"type":"string","description":"Unit type","default":"NA","enum":["NA","MBPS","MSEC","USEC","SEC","PERCENT","GB","BYTES"],"$$ref":"#/components/schemas/UnitType"},"val":{"type":"number","description":"Float value","format":"float"}},"$$ref":"#/components/schemas/ConfigParamFloatVal"},"str_val":{"type":"string","description":"String value"}},"$$ref":"#/components/schemas/RuleConfigProfileConfigParam"}},"create_timestamp":{"description":"Create timestamp for ConfigProfile","type":"string","format":"int64"},"update_timestamp":{"description":"Update timestamp for ConfigProfile","type":"string","format":"int64"},"version":{"description":"Current version of the configProfile","type":"string"}},"$$ref":"#/components/schemas/RuleConfigProfile"},"example":{"name":"Gold_L2VPN_ConfigProfile","namespace":"custom","description":"Thresholds to use for Gold L2VPN services","precedence":80,"rules":[{"name":"Rule-L2VPN-NM-P2P","namespace":"custom"}],"values":{"MEMFREE_THRESHOLD_MIN":{"description":"Threshold for minimum free memory to be available on the device.","type":"VAL_FLOAT","floatVal":{"unit":"GB","val":10}}}}}},"required":true},"responses":{"200":{"description":"OK. The request was successful. The result is contained in the response body.","content":{"application/json":{"schema":{"type":"object","description":"Response for the Heuristic Package Element CRUD.","properties":{"status":{"type":"string","description":"Response status for the Heuristic Package Element CRUD.","default":"RESP_STATUS_UNKNOWN","enum":["RESP_STATUS_UNKNOWN","RESP_STATUS_SUCCESS","RESP_STATUS_ERROR"],"$$ref":"#/components/schemas/HpCrudResponseStatus"},"error_description":{"description":"The reason for the error.","type":"string"},"name":{"description":"The name of the Heuristic Package Element.","type":"string"},"namespace":{"description":"The namespace of the Heuristic Package Element.","type":"string"}},"$$ref":"#/components/schemas/HpCrudResponse"},"example":{"data":[{"status":"RESP_STATUS_SUCCESS","name":"config.profile.sample","namespace":"custom"}]}}}},"default":{"description":"An empty response.","content":{"application/json":{"schema":{"type":"object","description":"Runtime error","properties":{"error":{"type":"string","description":"Error of Runtime error"},"code":{"type":"integer","description":"Code of Runtime error","format":"int32"},"message":{"type":"string","description":"Message of Runtime error"},"details":{"type":"array","description":"Details of Runtime error","items":{"type":"object","description":"ProtobufAny","properties":{"type_url":{"type":"string","description":"Type-url of ProtobufAny"},"value":{"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","type":"string","description":"Value of ProtobufAny","format":"byte"}},"$$ref":"#/components/schemas/protobufAny"}}},"$$ref":"#/components/schemas/runtimeError"},"example":{"data":[{"status":"RESP_STATUS_SUCCESS"}]}}}}},"x-codegen-request-body-name":"body","__originalOperationId":"AaHeuristicPackage_CreateConfigProfile","security":[{"bearerAuth":[]}],"method":"post","path":"/createConfigProfile"}}