{"type":"api","title":"Get historical KPI metrics 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 historical KPI metrics for a service.","operationId":"AaApplication_GetKpiProbeMetrics","requestBody":{"description":"The KpiMetricRequest parameter.","content":{"application/json":{"schema":{"type":"object","description":"Request - KPI Metrics","properties":{"serviceId":{"description":"Request KPI Metrics data for the Service-Id","type":"string"},"timeRange":{"description":"Duration - Number of hours/days","type":"integer","format":"int32"},"serviceType":{"description":"Type of the service","type":"string"},"probeSessionId":{"description":"Probe session id","type":"string"}},"$$ref":"#/components/schemas/KpiMetricsRequest"},"example":{"service_id":"ietf-l2vpn-ntw:l2vpn-ntw/vpn-services/vpn-service=l2nm-evpn-01_sr","service_type":"L3VPN","time_range":30,"probe_session_id":"62a6b199-12c9-5b04-ab3b-330fd3e6a53f"}}},"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 - KPI Metrics","properties":{"serviceId":{"description":"Service-id","type":"string"},"subserviceMetricList":{"description":"Subservice-id and corresponding metric list","type":"object","additionalProperties":{"type":"object","description":"Response - KPI Metrics data","properties":{"metricData":{"description":"Metric data","type":"array","items":{"type":"object","description":"Response - KPI Metrics data","properties":{"metricInstance":{"description":"Metric instance-id","type":"string"},"metricClass":{"description":"Metric class name","type":"string"},"namespace":{"description":"Metric namespace","type":"string"},"metricDisplayLabel":{"description":"Metric chart label to display","type":"string"},"metricValueDatatype":{"description":"Datatype of the Metric values","type":"string"},"thresholdValue":{"description":"Value of the threshold","type":"string"},"KpiHistoricalMetrics":{"description":"Timestamp and metric-value","type":"array","items":{"type":"object","properties":{"metricTimestamp":{"description":"The timestamp of the metric","type":"string","format":"int64"},"metricValue":{"description":"Value of the metric","type":"string"}},"description":"Timestamp and corresponding value of the metric.","$$ref":"#/components/schemas/KpiMetricsResponseMetricTimestampValues"}}},"$$ref":"#/components/schemas/KpiMetricsResponseMetricData"}}},"$$ref":"#/components/schemas/KpiMetricsResponseMetricList"}},"status":{"type":"string","description":"Request - Status mapping","default":"UNKNOWN_STATUS","enum":["UNKNOWN_STATUS","SERVICE_DOESNT_EXIST","BAD_REQUEST_SCHEMA","SUCCESS","ERROR"],"$$ref":"#/components/schemas/KpiMetricsResponseStatus"},"error":{"description":"Error details in case the request failed","type":"string"}},"$$ref":"#/components/schemas/KpiMetricsResponse"},"example":{"data":[{"service_id":"ietf-l2vpn-ntw:l2vpn-ntw/vpn-services/vpn-service=l2nm-p2p-a-b-y1731","subservice_metric_list":{"ss-1d48df18-2c8d-4f0c-9494-698f6f091c64":{"metric_data":[{"metric_instance":"metric.l2vpn.y1731.latency.rt system(device=CL2-PE-A, interfaceId=GigabitEthernet0/0/0/0.602, ipsla-number=round-trip-delay)","metric_class":"metric.l2vpn.y1731.latency.rt","namespace":"system","metric_display_label":"Latency: Roundtrip","metric_value_datatype":"float","threshold_value":"500","KpiHistoricalMetrics":[{}]}]}},"status":"SUCCESS"}]}}}},"default":{"description":"An empty 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":"SUCCESS"}]}}}}},"x-codegen-request-body-name":"body","__originalOperationId":"AaApplication_GetKpiProbeMetrics","security":[{"bearerAuth":[]}],"method":"post","path":"/kpimetrics"}}