{"type":"api","title":"Get matching rule and 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":"Get matching rule and config profile.","operationId":"AaHeuristicPackage_GetRuleAndConfigProfile","requestBody":{"description":"The RequestAssuranceOptionsDetails parameter.","content":{"application/json":{"schema":{"type":"object","properties":{"serviceKey":{"type":"string","description":"Service key"}},"description":"Use the API to request Service Health to return the eligible Rule and Profiles for a given service-id and type.","$$ref":"#/components/schemas/RequestAssuranceOptionsDetails"},"example":{"serviceKey":"ietf-l2vpn-ntw:l2vpn-ntw/vpn-services/vpn-service=L2VPN_NM-EVPN-VPWS-SR"}}},"required":true},"responses":{"200":{"description":"OK. The request was successful. The result is contained in the response body.","content":{"application/json":{"schema":{"type":"object","properties":{"serviceKey":{"type":"string","description":"Service key"},"rule_profile_options":{"type":"array","description":"Rule profile options","items":{"type":"object","description":"Response Assurance Options Details Rule Profile Option","properties":{"ruleClassId":{"type":"string","description":"Rule Class ID"},"ruleClassName":{"type":"string","description":"Rule Class Name"},"ruleClassNs":{"type":"string","description":"Rule Class Namespace"},"ruleClassDescription":{"type":"string","description":"Rule Class Description"},"subservice_classes":{"type":"array","description":"Subservice_classes","items":{"type":"object","description":"Response Assurance Options Details Subservice Class Info","properties":{"id":{"type":"string","description":"Properties"},"name":{"type":"string","description":"Name"},"namespace":{"type":"string","description":"Namespace"}},"$$ref":"#/components/schemas/ResponseAssuranceOptionsDetailsSubserviceClassInfo"}},"config_profiles":{"type":"array","description":"Config_profiles","items":{"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"}},"profile_constants":{"type":"array","description":"Profile-constants","items":{"type":"string","description":"Items of Profile-constants"}},"monitoring_type":{"type":"string","description":"Monitoring Type","default":"BASIC","enum":["BASIC","ADVANCED"],"$$ref":"#/components/schemas/MonitoringType"}},"$$ref":"#/components/schemas/ResponseAssuranceOptionsDetailsRuleProfileOption"}}},"description":"The API response provides a list of rules (defaults to 1 for MVP-1 release) and config profiles.","$$ref":"#/components/schemas/ResponseAssuranceOptionsDetails"},"example":{"data":[{"status":"RESP_STATUS_SUCCESS","name":"metric.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_GetRuleAndConfigProfile","security":[{"bearerAuth":[]}],"method":"post","path":"/assuranceOptions/query"}}