{"type":"api","title":"Get service details 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 service details for a service. ","operationId":"AaAssuranceGraph_GetServiceDetails","requestBody":{"description":"AssuranceReportRequest parameter.","content":{"application/json":{"schema":{"type":"object","description":"Assurance Report Request","properties":{"serviceId":{"description":"Service-id","type":"string"},"degradedPathsOnly":{"type":"boolean","description":"When a Crosswork user selects the check box in UI to show 'Down and Degraded only', the UI makes a query with this flag set to true. When set to true, the response will include only those subservices that are either in the down or degraded state, or those that are present in the path between the given service node and any of its subservice nodes that are in down or degraded state. When set to false, the response will include all the subservice nodes serving this given service instance."},"vpnNodeIds":{"description":"Device Ids on the service","type":"array","items":{"type":"string"}},"graph_only":{"description":"When set to true will return graph minimal data for consumers like UI to render VPN graph","type":"boolean"}},"$$ref":"#/components/schemas/AssuranceReportRequest"},"example":{"service_id":"ietf-l3vpn-ntw:l3vpn-ntw/vpn-services/vpn-service=L3VPN_5EP_10","degraded_paths_only":false,"vpn_node_ids":[]}}},"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":"Assurance Report Response","properties":{"serviceId":{"description":"Service-id","type":"string"},"ruleId":{"type":"string","description":"The rule used by the service."},"profileId":{"type":"string","description":"The profile used by the service."},"monitoringType":{"type":"string","description":"The monitoring type used for the service."},"degradedPathsOnly":{"type":"boolean","description":"The response for down and degraded services. Refer to AssuranceReportRequest for details."},"status":{"type":"string","description":"Service assurance report is shared via NB using below schema.","default":"UNKNOWN_STATUS","enum":["UNKNOWN_STATUS","SERVICE_DOESNT_EXIST","BAD_REQUEST_SCHEMA","SUCCESS","ERROR","REACHED_MAX_CAPACITY_OF_NODES"],"$$ref":"#/components/schemas/assuranceReportResponseStatus"},"error":{"type":"array","description":"Error details in case the request failed.","items":{"type":"string"}},"assuranceGraph":{"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"},"healthReport":{"type":"object","description":"Service Health Report","properties":{"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"},"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"},"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"}},"subserviceHealthReports":{"type":"object","description":"Subservice Health Reports","additionalProperties":{"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"}}},"$$ref":"#/components/schemas/ServiceHealthReport"},"rootSubservices":{"description":"List of IDs of the subservice nodes that are directly connected to the Service node.","type":"array","items":{"type":"string"}},"fragment_id":{"description":"Kafka message chunking fragment ID","type":"integer","format":"int32"},"more_fragments":{"description":"Flag to indicate if more Kafka message chunking fragments are available.","type":"boolean"}},"$$ref":"#/components/schemas/assuranceReportResponse"},"example":{"data":[{"service_id":"ietf-l2vpn-ntw:l2vpn-ntw/vpn-services/vpn-service=L2VPN_NM-EVPN-VPWS-SR","degraded_paths_only":true,"status":"SUCCESS","assurance_graph":{"SubserviceDependencies":[]},"health_report":{"health_status":"SERVICE_DEGRADED","subservice_health_reports":{}},"rootSubservices":["subservice.path.reachability.to.peer.system.6921f1c7d8e2c18bbcb22c21d1226c01475c818d915ca6a4094b41f336419ed3"]}]}}}},"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":[{"service_id":"ietf-l2vpn-ntw:l2vpn-ntw/vpn-services/vpn-service=l2nm-p2p-a-b-1731","status":"SERVICE_DOESNT_EXIST","error":"no service exists for the given Service ID"}]}}}}},"x-codegen-request-body-name":"body","__originalOperationId":"AaAssuranceGraph_GetServiceDetails","security":[{"bearerAuth":[]}],"method":"post","path":"/serviceDetails"}}