Get all health metrics
get
/v1/sitemetrics
Gets the requests count, average latency, percentage, and success and error metrics at service level and sub service level for a given site for a given time interval.
Request
Header Parameters
-
Authorization(required): string
The JWT token for authentication. The token should be passed in the format: Bearer [jwtToken]
-
fromDate: string
The start date to filter the metrics data. Format: YYYY-MM-DDTHH:mm:ssZ. If fromDate and toDate are provided, then the metrics data within that time range is retrieved. If timeInterval and fromDate are provided, then the metrics data for the time interval starting from the fromDate is retrieved.Example:
2025-01-31T05:28:00Z -
timeInterval: integer
The time interval (in minutes) to filter the metric data. If timeInterval and fromDate are provided, then the metrics data for the time interval starting from the fromDate is retrieved. If timeInterval and toDate are provided, then the metrics data for the time interval starting from the computed fromDate is retrieved. Minimum Value is 1. Maximum Value is 120. Default value is 120.Example:
100 -
toDate: string
The end date to filter the data. Format: YYYY-MM-DDTHH:mm:ssZ. If fromDate and toDate are provided, then the metrics data within that time range is retrieved. If timeInterval and toDate are provided, then the metrics data for the time interval starting from the computed fromDate is retrieved.Example:
2025-01-31T06:20:00Z
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
- string
200 Response
Metrics returned successfully
Root Schema : metricOverview
Type:
objectMetrics Overview consists of Service-level and Site-level metric
Show Source
-
serviceMetrics: array
service
Title:
serviceThe list of Service with respective metrics. -
siteMetrics: object
siteMetrics
Title:
siteMetricsThe site metrics with their respective metrics. -
siteName: string
The site name for which the metrics data is retrieved.
-
timeInterval: string
The time interval (in minutes) for which the metrics data is retrieved.
-
updatedTime: string
The last updated time for which the metrics data is retrieved.
Nested Schema : service
Type:
arrayTitle:
serviceThe list of Service with respective metrics.
Show Source
-
Array of:
object serviceMetric
Title:
serviceMetricService metric with respective metrics..
Nested Schema : siteMetrics
Type:
objectTitle:
siteMetricsThe site metrics with their respective metrics.
Show Source
-
averageLatency: number
The average latency (in milliseconds) for the requests served by the service. Average latency is the average time required to serve a request by a specific service or subservice..
-
successPercentage: number
Percentage of the Success requests.
-
totalRequests: number
The total number of requests received from all the services or the specified service.
Nested Schema : serviceMetric
Type:
objectTitle:
serviceMetricService metric with respective metrics..
Show Source
-
service: object
serviceMetrics
Title:
serviceMetricsService metrics with respective metrics.
Nested Schema : serviceMetrics
Type:
objectTitle:
serviceMetricsService metrics with respective metrics.
Show Source
-
averageLatency: number
The average latency (in milliseconds) for the requests served by the service. Average latency is the average time required to serve a request by a specific service or subservice..
-
errorRequests: object
errorRequests
Title:
errorRequestsError Requests with respective metrics. -
subServices: array
subServices
Title:
subServicesThe list of subServices with respective metrics. -
successRequests: object
successRequests
Title:
successRequestsSuccess Requests with respective metrics.. -
totalRequests: number
The total number of requests received from all the services or the specified service.
Nested Schema : errorRequests
Type:
objectTitle:
errorRequestsError Requests with respective metrics.
Show Source
-
averageLatency: number
The average latency (in milliseconds) for the requests served by the service. Average latency is the average time required to serve a request by a specific service or subservice..
-
metricData: array
metricData
Title:
metricDataThe list of statuses with respective metrics. -
totalPercentage: number
The total percentage of requests received from the total requests.
-
totalRequests: number
The total number of requests received from all the services or the specified service.
Nested Schema : subServices
Type:
arrayTitle:
subServicesThe list of subServices with respective metrics.
Show Source
-
Array of:
object subServices
Title:
subServicesSub Services for each Service
Nested Schema : successRequests
Type:
objectTitle:
successRequestsSuccess Requests with respective metrics..
Show Source
-
averageLatency: number
The average latency (in milliseconds) for the requests served by the service. Average latency is the average time required to serve a request by a specific service or subservice..
-
metricData: array
metricData
Title:
metricDataThe list of statuses with respective metrics. -
totalPercentage: number
The total percentage of requests received from the total requests.
-
totalRequests: number
The total number of requests received from all the services or the specified service.
Nested Schema : metricData
Type:
arrayTitle:
metricDataThe list of statuses with respective metrics.
Show Source
-
Array of:
object status
Title:
statusStatus
Nested Schema : status
Type:
objectTitle:
statusStatus
Show Source
-
status: object
statusCode
Title:
statusCodestatus Code with respective metrics.
Nested Schema : statusCode
Type:
objectTitle:
statusCodestatus Code with respective metrics.
Show Source
-
averageLatency: number
The average latency (in milliseconds) for the requests served by the service. Average latency is the average time required to serve a request by a specific service or subservice..
-
totalPercentage: number
The total percentage of requests received from the total requests.
-
totalRequests: number
The total number of requests received from all the services or the specified service.
Nested Schema : subServices
Type:
objectTitle:
subServicesSub Services for each Service
Show Source
-
subService: object
service
Title:
serviceservice.
Nested Schema : service
Type:
objectTitle:
serviceservice.
Show Source
-
averageLatency: number
The average latency (in milliseconds) for the requests served by the service. Average latency is the average time required to serve a request by a specific service or subservice.
-
errorRequests: object
errorRequests
Title:
errorRequestsError Requests with respective metrics. -
successRequests: object
successRequests
Title:
successRequestsSuccess Requests with respective metrics.. -
totalRequests: number
The total number of requests received from all the services or the specified service.
Nested Schema : metricData
Type:
arrayTitle:
metricDataThe list of statuses with respective metrics.
Show Source
-
Array of:
object status
Title:
statusStatus
400 Response
Invalid Input parameters
Root Schema : schema
Type:
string401 Response
Invalid/Expired Token
Root Schema : schema
Type:
string500 Response
Internal server error
Root Schema : schema
Type:
stringExamples
The following example shows how to get all health metrics at service level and sub service level for a given site.
cURL Command Example
curl -X GET "https://mysite.example.com/v1/sitemetrics" -H "Authorization: Bearer HMeyJraWQiOiIxMDAwZXllc19sbiIsImFsZyI6Il"
Response Body Example
The following shows an example of the response body in JSON format.
{
"serviceMetrics": [
{
"widgetserver": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 2.12,
"successRequests": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
},
"subServices": [
{
"customer_portal": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0,
"successRequests": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 724,
"averageLatency": 1,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
}
]
}
},
{
"chat": {
"totalRequests": 809,
"averageLatency": 1311,
"totalPercentage": 2.37,
"successRequests": {
"totalRequests": 809,
"averageLatency": 1311,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 809,
"averageLatency": 1311,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
},
"subServices": [
{
"Chat_REST": {
"totalRequests": 242,
"averageLatency": 113,
"totalPercentage": 29.91,
"successRequests": {
"totalRequests": 242,
"averageLatency": 113,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 242,
"averageLatency": 113,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
},
{
"Chat_SOAP": {
"totalRequests": 567,
"averageLatency": 1822,
"totalPercentage": 70.09,
"successRequests": {
"totalRequests": 567,
"averageLatency": 1822,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 567,
"averageLatency": 1822,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
}
]
}
},
{
"Browser_UI": {
"totalRequests": 23038,
"averageLatency": 43,
"totalPercentage": 67.61,
"successRequests": {
"totalRequests": 23038,
"averageLatency": 43,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 20720,
"averageLatency": 38,
"totalPercentage": 89.94
}
},
{
"204": {
"totalRequests": 1315,
"averageLatency": 30,
"totalPercentage": 5.71
}
},
{
"302": {
"totalRequests": 1003,
"averageLatency": 177,
"totalPercentage": 4.35
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
},
"subServices": [
{
"other": {
"totalRequests": 23038,
"averageLatency": 43,
"totalPercentage": 100.0,
"successRequests": {
"totalRequests": 23038,
"averageLatency": 43,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 20720,
"averageLatency": 38,
"totalPercentage": 89.94
}
},
{
"204": {
"totalRequests": 1315,
"averageLatency": 30,
"totalPercentage": 5.71
}
},
{
"302": {
"totalRequests": 1003,
"averageLatency": 177,
"totalPercentage": 4.35
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
}
]
}
},
{
"webserver": {
"totalRequests": 9504,
"averageLatency": 85,
"totalPercentage": 27.89,
"successRequests": {
"totalRequests": 9504,
"averageLatency": 85,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 8639,
"averageLatency": 79,
"totalPercentage": 90.9
}
},
{
"302": {
"totalRequests": 263,
"averageLatency": 234,
"totalPercentage": 2.77
}
},
{
"201": {
"totalRequests": 240,
"averageLatency": 204,
"totalPercentage": 2.53
}
},
{
"404": {
"totalRequests": 121,
"averageLatency": 17,
"totalPercentage": 1.27
}
},
{
"206": {
"totalRequests": 121,
"averageLatency": 4,
"totalPercentage": 1.27
}
},
{
"401": {
"totalRequests": 120,
"averageLatency": 84,
"totalPercentage": 1.26
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
},
"subServices": [
{
"connectRest": {
"totalRequests": 720,
"averageLatency": 141,
"totalPercentage": 7.58,
"successRequests": {
"totalRequests": 720,
"averageLatency": 141,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 360,
"averageLatency": 119,
"totalPercentage": 50.0
}
},
{
"201": {
"totalRequests": 240,
"averageLatency": 204,
"totalPercentage": 33.33
}
},
{
"401": {
"totalRequests": 120,
"averageLatency": 84,
"totalPercentage": 16.67
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
},
{
"other": {
"totalRequests": 8301,
"averageLatency": 69,
"totalPercentage": 87.34,
"successRequests": {
"totalRequests": 8301,
"averageLatency": 69,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 7796,
"averageLatency": 65,
"totalPercentage": 93.92
}
},
{
"302": {
"totalRequests": 263,
"averageLatency": 234,
"totalPercentage": 3.17
}
},
{
"404": {
"totalRequests": 121,
"averageLatency": 17,
"totalPercentage": 1.46
}
},
{
"206": {
"totalRequests": 121,
"averageLatency": 4,
"totalPercentage": 1.46
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
},
{
"customer_portal": {
"totalRequests": 483,
"averageLatency": 270,
"totalPercentage": 5.08,
"successRequests": {
"totalRequests": 483,
"averageLatency": 270,
"totalPercentage": 100.0,
"metricData": [
{
"200": {
"totalRequests": 483,
"averageLatency": 270,
"totalPercentage": 100.0
}
}
]
},
"errorRequests": {
"totalRequests": 0,
"averageLatency": 0,
"totalPercentage": 0.0,
"metricData": []
}
}
}
]
}
}
],
"siteMetrics": {
"totalRequests": 34075,
"averageLatency": 84,
"successPercentage": 100.0
},
"siteName": "my_site",
"updatedTime": "2025-01-28T06:56:00Z",
"timeInterval": 120
}