{"type":"api","title":"Get Assurance Graph for a service","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/960a628c-2f33-3367-a4ec-faca586888c5","info":{"title":"Service Health Historical Data APIs","description":"APIs for requesting historical data recorded 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_application_overview.md"}},"openapi":"3.0.1","servers":[{"url":"/crosswork/aa/aaapp/v1/"}],"securitySchemes":{"bearerAuth":{"type":"apiKey","description":"Security token for authorizing requests for these APIs.","name":"Authorization","in":"header"}}},"spec":{"tags":["AaApplication"],"summary":"Get Assurance Graph for a service","operationId":"AaApplication_GetHistoricalService","requestBody":{"description":"historicalServiceRequest parameter.","content":{"application/json":{"schema":{"type":"object","description":"Request - Historical Service","properties":{"serviceId":{"description":"Service-id","type":"string"},"eosTimestamp":{"description":"EOS timestamp","type":"string","format":"int64"},"numOfDays":{"description":"Duration - Number of days","type":"integer","format":"int32"},"serviceType":{"description":"Type of the service","type":"string"},"vpnNodeIds":{"description":"Device Ids or Endpoints of the service","type":"array","items":{"type":"string"}},"graphOnly":{"description":"When set to true will return graph minimal data for consumers like UI to render VPN graph","type":"boolean"}},"$$ref":"#/components/schemas/HistoricalServiceRequest"},"example":{"service_id":"ietf-l2vpn-ntw:l2vpn-ntw/vpn-services/vpn-service=l2nm-evpn-01_sr","eos_timestamp":1627069771759119600}}},"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":"The ID of the service.","title":"Service-id","type":"string"},"ruleId":{"type":"string","description":"The ID of the rule used by the service."},"profileId":{"type":"string","description":"The ID of the profile used by the service."},"monitoringType":{"type":"string","description":"Monitoring Type (Basic or Advanced) used by the service."},"degradedPathsOnly":{"type":"boolean","description":"The response to use with services/subservices in a down or degraded state. See the AssuranceReportRequest API 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"],"$$ref":"#/components/schemas/assuranceReportResponseStatus"},"error":{"type":"string","description":"Error details in case the request failed."},"assuranceGraph":{"description":"Service Graph","type":"object","properties":{"subserviceDependencies":{"description":"Subservice dependencies","type":"array","items":{"type":"object","description":"Subservice SG node","properties":{"id":{"description":"subservice-id UUID","type":"string"},"subServiceClass":{"description":"SubserviceClass Name","type":"string"},"namespace":{"description":"Namespace","type":"string"},"description":{"description":"Description","type":"string"},"staticId":{"description":"The combination of subServiceClass, namespace and config","type":"string"},"config":{"type":"object","properties":{"args":{"description":"List of arguments passed to this subservice.","type":"array","items":{"type":"object","description":"Subservice Config Arg","properties":{"param":{"type":"object","description":"HP Element Parameter","properties":{"name":{"type":"string","description":"The name of this parameter. Examples: DEVICE, IFNAME, IFENTRY, VPN."},"description":{"type":"string","description":"Description"},"type":{"type":"string","description":"ParamType allows HPMgr to interpret the nature of the argument values passed while instantiating HP 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"}}},"$$ref":"#/components/schemas/SubserviceConfigArg"}}},"description":"The Subservice Configuration.","$$ref":"#/components/schemas/SubserviceConfig"},"dynamicSS":{"description":"Flag indicating that the given subservice is dynamic.","type":"boolean"},"subDeps":{"description":"Hard Dependencies: List of subservice-ids which are of string type.","type":"array","items":{"type":"string"}},"softSubDeps":{"description":"Soft Dependencies: List of subservice-ids which are of string type.","type":"array","items":{"type":"string"}},"dynamicSubDeps":{"description":"List of hard and soft dynamic subservice dependencies. These lists can change dynamically independent of the rest of the Service Graph.","type":"array","items":{"type":"string"}},"dynamicSoftSubDeps":{"description":"Dynamic soft sub-dependencies","type":"array","items":{"type":"string"}}},"$$ref":"#/components/schemas/SubserviceSGNode"}},"softRootSubserviceNodes":{"description":"List of Subservice-ids that have a soft relationship with the service node.","type":"array","items":{"type":"string"}}},"$$ref":"#/components/schemas/ServiceGraph"},"healthReport":{"description":"Service Health report","type":"object","properties":{"healthStatus":{"type":"string","description":"Service Health Statuses: \n - UNKNOWN: Default state displayed by CNC-ISTP, when monitoring is not enabled for a given service.\n - MONITORING_INITIATED: When a monitoring request is received for a service, Service Health initializes the service or subservice to this state.\n - MONITORING_FAILED: Indicates Service Health has encountered an internal error or failure.\n - MONITORING_PAUSED: Indicates that monitoring is currently paused, but historical data is still available for inspection through the timeline.\n - SERVICE_UP: At the service level, this state indicates that all the individual subservices of the monitored service are in good health and operating without any 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: At the Service level, this state indicates that some of the subservices of the Service that is 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, set 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":{"description":"Live Metric Feeds","type":"object","additionalProperties":{"type":"object","description":"Live Metric Feed","properties":{"metricLabel":{"type":"string","description":"Metric identifier. SubserviceClass definition provides this label value."},"description":{"description":"Reflects the 'description' field in SubserviceClass","type":"string"},"threshold":{"description":"Reflects the 'threshold' field in SubserviceClass","type":"string"},"unitType":{"description":"Unit type for the given metric","type":"string"},"feedVal":{"type":"object","description":"Output metric value","properties":{"s":{"description":"string","type":"string"},"f":{"description":"float","type":"number","format":"float"},"d":{"description":"double","type":"number","format":"double"},"i":{"description":"int64","type":"string","format":"int64"},"u":{"description":"uint64","type":"string","format":"uint64"},"b":{"description":"boolean","type":"boolean"},"updateTimestamp":{"description":"Updated timestamp","type":"string","format":"int64"}},"$$ref":"#/components/schemas/OutputMetricValue"},"updateTimestamp":{"description":"The time when the feed was last updated","type":"string","format":"int64"}},"$$ref":"#/components/schemas/LiveMetricFeed"}},"subServiceHealthReports":{"description":"subService Health Reports","type":"object","additionalProperties":{"type":"object","description":"Subservice Oper State","properties":{"healthScore":{"description":"Health score","type":"integer","format":"int64"},"healthStatus":{"type":"string","description":"Service Health Statuses: \n - UNKNOWN: Default state displayed by CNC-ISTP, when monitoring is not enabled for a given service.\n - MONITORING_INITIATED: When a monitoring request is received for a service, Service Health initializes the service or subservice to this state.\n - MONITORING_FAILED: Indicates Service Health has encountered an internal error or failure.\n - MONITORING_PAUSED: Indicates that monitoring is currently paused, but historical data is still available for inspection through the timeline.\n - SERVICE_UP: At the service level, this state indicates that all the individual subservices of the monitored service are in good health and operating without any 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: At the Service level, this state indicates that some of the subservices of the Service that is 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 the 'description' field in SubserviceClass","type":"string"},"threshold":{"description":"Reflects the 'threshold' field in SubserviceClass","type":"string"},"unitType":{"description":"Unit type for the given metric","type":"string"},"feedVal":{"type":"object","description":"Output metric value","properties":{"s":{"description":"string","type":"string"},"f":{"description":"float","type":"number","format":"float"},"d":{"description":"double","type":"number","format":"double"},"i":{"description":"int64","type":"string","format":"int64"},"u":{"description":"uint64","type":"string","format":"uint64"},"b":{"description":"boolean","type":"boolean"},"updateTimestamp":{"description":"Updated timestamp","type":"string","format":"int64"}},"$$ref":"#/components/schemas/OutputMetricValue"},"updateTimestamp":{"description":"The 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":"To store each component's list of error messages and its timestamp.","properties":{"errorMsgs":{"type":"array","description":"Error message","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 subservice health got updated.","type":"string","format":"int64"},"trackerTs":{"description":"The last time subservice health was updated due to a health update sent by a tracker.","type":"string","format":"int64"},"subGraph":{"description":"Service Graph","type":"object","properties":{"subserviceDependencies":{"description":"Subservice dependencies","type":"array","items":{"type":"object","description":"Subservice SG node","properties":{"id":{"description":"subservice-id UUID","type":"string"},"subServiceClass":{"description":"SubserviceClass Name","type":"string"},"namespace":{"description":"Namespace","type":"string"},"description":{"description":"Description","type":"string"},"staticId":{"description":"The combination of subServiceClass, namespace and config","type":"string"},"config":{"type":"object","properties":{"args":{"description":"List of arguments passed to this subservice.","type":"array","items":{"type":"object","description":"Subservice Config Arg","properties":{"param":{"type":"object","description":"HP Element Parameter","properties":{"name":{"type":"string","description":"The name of this parameter. Examples: DEVICE, IFNAME, IFENTRY, VPN."},"description":{"type":"string","description":"Description"},"type":{"type":"string","description":"ParamType allows HPMgr to interpret the nature of the argument values passed while instantiating HP 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"}}},"$$ref":"#/components/schemas/SubserviceConfigArg"}}},"description":"The Subservice Configuration.","$$ref":"#/components/schemas/SubserviceConfig"},"dynamicSS":{"description":"Flag indicating that the given subservice is dynamic.","type":"boolean"},"subDeps":{"description":"Hard Dependencies: List of subservice-ids which are of string type.","type":"array","items":{"type":"string"}},"softSubDeps":{"description":"Soft Dependencies: List of subservice-ids which are of string type.","type":"array","items":{"type":"string"}},"dynamicSubDeps":{"description":"List of hard and soft dynamic subservice dependencies. These lists can change dynamically independent of the rest of the Service Graph.","type":"array","items":{"type":"string"}},"dynamicSoftSubDeps":{"description":"Dynamic soft sub-dependencies","type":"array","items":{"type":"string"}}},"$$ref":"#/components/schemas/SubserviceSGNode"}},"softRootSubserviceNodes":{"description":"List of Subservice-ids that have a soft relationship with the service node.","type":"array","items":{"type":"string"}}},"$$ref":"#/components/schemas/ServiceGraph"},"monitoringStatus":{"type":"string","description":"Monitoring statuses: \n - MONITORING_UNKNOWN: Default status, set 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"}},"fragmentId":{"description":"Kafka message chunking fragment ID","type":"integer"},"moreFragments":{"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":{"description":"Gateway Runtime Error","type":"object","properties":{"error":{"description":"Error","type":"string"},"code":{"description":"Code","type":"integer","format":"int32"},"message":{"description":"Message","type":"string"},"details":{"description":"Details","type":"array","items":{"description":"Protobuf any","type":"object","properties":{"typeUrl":{"description":"Type URL","type":"string"},"value":{"description":"Value","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","type":"string","format":"byte"}},"$$ref":"#/components/schemas/protobufAny"}}},"$$ref":"#/components/schemas/GatewayRuntimeError"},"example":{"data":[{"status":"ERROR","error":"Historical Service file not found -"}]}}}}},"x-codegen-request-body-name":"body","__originalOperationId":"AaApplication_GetHistoricalService","security":[{"bearerAuth":[]}],"method":"post","path":"/historicalservice"}}