{"type":"api","title":"Get matching subservices for a service. ","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/0a9b2acc-7c69-3a2d-a85e-640d9a4fe06c","info":{"title":"Service Health Assurance Graph APIs","description":"APIs for requesting assurance-graph data stored in 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_assurance_graph_overview.md"}},"openapi":"3.0.1","servers":[{"url":"/crosswork/aa/agmgr/v1/"}],"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Security token for authorizing requests for these APIs.","name":"Authorization","in":"header"}}},"spec":{"tags":["AaAssuranceGraph"],"summary":"Get matching subservices for a service. ","operationId":"AaAssuranceGraph_GetMatchingSubservices","requestBody":{"description":"RequestSubservices parameter. ","content":{"application/json":{"schema":{"type":"object","description":"Request Subservices.","properties":{"type":{"type":"string","description":"Request for getting the list of Policy/Device subservices for a given service. (Supported types for MVP-1: TransportSubservices, DeviceSubservices)","default":"UNKNOWN","enum":["UNKNOWN","TRANSPORT_SUBSERVICES","DEVICE_SUBSERVICES","TAGGED_SUBSERVICES"],"$$ref":"#/components/schemas/RequestSubservicesType"},"service_id":{"type":"string","description":"Request the subservices for a given subservice-id."},"tags":{"description":"To be used when Type is TAGGED_SUBSERVICES","type":"array","items":{"type":"string"}}},"$$ref":"#/components/schemas/RequestSubservices"},"example":{"service_id":"ietf-l3vpn-ntw:l3vpn-ntw/vpn-services/vpn-service=L3VPN_5EP_10","type":"TAGGED_SUBSERVICES","tags":["PROBE_SESSION"]}}},"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 subservices","properties":{"status":{"type":"string","description":"Response subservices status details for a given subservice.","default":"UNKNOWN","enum":["UNKNOWN","SUCCESS","INVALID_REQUEST_TYPE","SERVICE_DOESNT_EXIST","BAD_REQUEST_SCHEMA","ERROR"],"$$ref":"#/components/schemas/ResponseSubservicesSsStatus"},"subservices":{"description":"List of policy subservices","type":"array","items":{"type":"object","description":"Subservice node","properties":{"id":{"description":"subservice id - uuid","type":"string"},"subservice_class":{"type":"string","description":"Subservice class"},"namespace":{"type":"string","description":"Namespace"},"static_id":{"type":"string","description":"Static id"},"config":{"description":"Subservice Config","type":"object","properties":{"args":{"type":"array","description":"List of arguments passed to this subservice.","items":{"type":"object","description":"Subservice Config Arg","properties":{"parameter":{"type":"object","description":"HPElem Param","properties":{"name":{"type":"string","description":"Name of this parameter. Examples: DEVICE, IFNAME, IFENTRY, VPN."},"description":{"type":"string","description":"Description of HPElemParam"},"type":{"type":"string","description":"ParamType allows HPMgr to interpret the nature of the argument values passed while instantiating Heuristic Package elements like Rule, Subservice etc.","default":"PARAM_TYPE_NON_LIST","enum":["PARAM_TYPE_NON_LIST","PARAM_TYPE_LIST"],"$$ref":"#/components/schemas/HPElemParamType"}},"$$ref":"#/components/schemas/HPElemParam"},"values":{"description":"Given argument could be a list of values like [Tor-A, Tor-B] for given key-name 'Devices'","type":"array","items":{"type":"string","description":"String"}}},"$$ref":"#/components/schemas/SubserviceConfigArg"}}},"$$ref":"#/components/schemas/subserviceConfig"},"oper":{"type":"object","description":"Subservice Oper State","properties":{"healthScore":{"type":"integer","description":"Health score","format":"int64"},"healthStatus":{"type":"string","description":"Service Health Statuses: \n - UNKNOWN: Default state that CNC-ISTP displays when monitoring is not enabled for a given service.\n - MONITORING_INITIATED: When Service Health receives a monitoring request for a given service, the service gets initialized to this state.\n - MONITORING_FAILED: State reflecting that Service Health ran into some internal error or failure. Sample failures: collection job failure, unexpected feed coming in from device etc.\n - MONITORING_PAUSED: State reflecting that monitoring is in the 'pause' state; that is, monitoring is not active but historical data is available for inspection via the timeline.\n - SERVICE_UP: All the different subservices of the Service that are being monitored are healthy, with no issues to report.\n - SERVICE_DOWN: All the different subservices of the Service that are being monitored are reporting issues. Corresponding symptoms should provide more details about the issues being encountered.\n - SERVICE_DEGRADED: Some of the subservices of that Service that are being monitored are reporting issues. Corresponding symptoms should provide more details about the issues being encountered.","default":"UNKNOWN","enum":["UNKNOWN","MONITORING_INITIATED","MONITORING_FAILED","MONITORING_PAUSED","SERVICE_UP","SERVICE_DOWN","SERVICE_DEGRADED"],"$$ref":"#/components/schemas/HealthStatus"},"liveMetricFeeds":{"type":"object","description":"Live metric feeds","additionalProperties":{"type":"object","description":"Live metric feed","properties":{"metricLabel":{"type":"string","description":"Metric identifier. SubserviceClass definition provides this label value."},"description":{"description":"Reflects 'description' field in SSC","type":"string"},"threshold":{"description":"Reflects 'threshold' field in SSC","type":"string"},"unitType":{"description":"Unit type for the given metric","type":"string"},"feedVal":{"type":"object","description":"Output Metric Value","properties":{"s":{"type":"string","description":"String value of OutputMetricValue"},"f":{"type":"number","format":"float","description":"Float value of OutputMetricValue"},"d":{"type":"number","format":"double","description":"Double value of OutputMetricValue"},"i":{"type":"string","format":"int64","description":"Int64 value of OutputMetricValue"},"u":{"type":"string","format":"uint64","description":"Uint64 value of OutputMetricValue"},"b":{"type":"boolean","description":"Boolean value of OutputMetricValue"},"updateTimestamp":{"type":"string","format":"int64","description":"Update Timestamp of OutputMetricValue"}},"$$ref":"#/components/schemas/OutputMetricValue"},"updateTimestamp":{"description":"Time when the feed was last updated","type":"string","format":"int64"}},"$$ref":"#/components/schemas/liveMetricFeed"}},"rootExpressionStatus":{"$ref":"#/components/schemas/outputSimpleValue"},"ruleTriggerConditions":{"$ref":"#/components/schemas/subserviceOperStateRuleTriggerConditions"},"componentErrors":{"type":"object","description":"Component errors","additionalProperties":{"type":"object","description":"Each component's list of error messages","properties":{"errorMsgs":{"type":"array","description":"List if Error messages","items":{"type":"object","properties":{"errorMsg":{"type":"string","description":"Error message"},"createdTs":{"type":"string","description":"Created Timestamp"}},"description":"To store each component's list of error messages and its timestamp.","$$ref":"#/components/schemas/componentErrorError"}}},"$$ref":"#/components/schemas/componentError"}},"healthTs":{"description":"The last time the subservice health got updated","type":"string","format":"int64"},"trackerTs":{"type":"string","description":"The last time the subservice health was updated due to health updates sent by the tracker.","format":"int64"},"subGraph":{"type":"object","description":"Service Graph","properties":{"SubserviceDependencies":{"type":"array","description":"Subservice Dependencies","items":{"type":"object","description":"Subservice SG Node","properties":{"id":{"description":"subservice-id - UUID","type":"string"},"subserviceClass":{"description":"SubserviceClass Name","type":"string"},"namespace":{"type":"string","description":"Subservice namespace"},"description":{"type":"string","description":"SubserviceClass Description"},"staticId":{"description":"Combination of subservice_class, namespace and config","type":"string"},"config":{"description":"Subservice Config","type":"object","properties":{"args":{"type":"array","description":"List of arguments passed to this subservice.","items":{"type":"object","description":"Subservice Config Arg","properties":{"parameter":{"type":"object","description":"HPElem Param","properties":{"name":{"type":"string","description":"Name of this parameter. Examples: DEVICE, IFNAME, IFENTRY, VPN."},"description":{"type":"string","description":"Description of HPElemParam"},"type":{"type":"string","description":"ParamType allows HPMgr to interpret the nature of the argument values passed while instantiating Heuristic Package elements like Rule, Subservice etc.","default":"PARAM_TYPE_NON_LIST","enum":["PARAM_TYPE_NON_LIST","PARAM_TYPE_LIST"],"$$ref":"#/components/schemas/HPElemParamType"}},"$$ref":"#/components/schemas/HPElemParam"},"values":{"description":"Given argument could be a list of values like [Tor-A, Tor-B] for given key-name 'Devices'","type":"array","items":{"type":"string","description":"String"}}},"$$ref":"#/components/schemas/SubserviceConfigArg"}}},"$$ref":"#/components/schemas/subserviceConfig"},"dynamicSS":{"description":"Flag indicating if the given subservice is dynamic","type":"boolean"},"subDeps":{"type":"array","description":"Hard Dependencies: List of Subservice-ids which are of string type.","items":{"type":"string","description":"String"}},"softSubDeps":{"type":"array","description":"Soft Dependencies: List of Subservice-ids which are of string type.","items":{"type":"string","description":"String"}},"dynamicSubDeps":{"type":"array","description":"List of hard and soft dynamic subservice dependencies. These lists can change dynamically independent of the rest of the service graph.","items":{"type":"string","description":"String"}},"dynamicSoftSubDeps":{"type":"array","description":"Dynamic Soft Dependencies: List of Subservice-ids which are of string type.","items":{"type":"string","description":"String"}}},"$$ref":"#/components/schemas/SubserviceSGNode"}},"SoftRootSubserviceNodes":{"type":"array","description":"List of Subservice-ids that have a soft relationship with the service node.","items":{"type":"string"}}},"$$ref":"#/components/schemas/serviceGraph"},"monitoringStatus":{"type":"string","description":"Monitoring statuses: \n - MONITORING_UNKNOWN: default status when the monitoring status is unknown.\n - MONITORING_SUCCESS: Success state when there are no errors in monitoring.\n - ENCOUNTERED_ERRORS: State reflects the monitoring errors.","default":"MONITORING_UNKNOWN","enum":["MONITORING_UNKNOWN","MONITORING_SUCCESS","ENCOUNTERED_ERRORS"],"$$ref":"#/components/schemas/MonitoringStatus"}},"$$ref":"#/components/schemas/SubserviceOperState"},"create_timestamp":{"type":"string","description":"Create timestamp","format":"int64"},"update_timestamp":{"type":"string","description":"Update timestamp","format":"int64"}},"$$ref":"#/components/schemas/SubserviceNode"}},"error":{"description":"Error detail on hitting error","type":"string"}},"$$ref":"#/components/schemas/ResponseSubservices"},"example":{"data":[{"subservices":[{"id":"ss-368097b7-7b57-49b4-87c6-452f4e793fb6","subservice_class":"subservice.probe.session.health","namespace":"custom","static_id":"subservice.probe.session.health.custom.args","config":{"args":[]},"oper":{"health_score":100,"health_status":"SERVICE_UP","rootExpressionStatus":{},"health_ts":"1689990432386480864","tracker_ts":"1689990432373866549"},"create_timestamp":"1689990419952293227","update_timestamp":"1689990432373866549"}]}]}}}},"default":{"description":"An unexpected error response.","content":{"application/json":{"schema":{"type":"object","description":"GatewayruntimeError","properties":{"error":{"type":"string","description":"Error of GatewayruntimeError"},"code":{"type":"integer","description":"Code of GatewayruntimeError","format":"int32"},"message":{"type":"string","description":"Message of GatewayruntimeError"},"details":{"type":"array","description":"Details of GatewayruntimeError","items":{"type":"object","description":"ProtobufAny","properties":{"typeUrl":{"type":"string","description":"typeUrl 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/GatewayruntimeError"},"example":{"data":[{"status":"ERROR","error":"empty tags provided"}]}}}}},"x-codegen-request-body-name":"body","__originalOperationId":"AaAssuranceGraph_GetMatchingSubservices","security":[{"bearerAuth":[]}],"method":"post","path":"/matchingSubservices"}}