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
  • The JWT token for authentication. The token should be passed in the format: Bearer [jwtToken]
  • 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
  • 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
  • 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 Top

Response

Supported Media Types

200 Response

Metrics returned successfully
Body ()
Root Schema : metricOverview
Type: object
Metrics Overview consists of Service-level and Site-level metric
Show Source
Nested Schema : service
Type: array
Title: service
The list of Service with respective metrics.
Show Source
Nested Schema : siteMetrics
Type: object
Title: siteMetrics
The site metrics with their respective metrics.
Show Source
  • 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..
  • Percentage of the Success requests.
  • The total number of requests received from all the services or the specified service.
Nested Schema : serviceMetric
Type: object
Title: serviceMetric
Service metric with respective metrics..
Show Source
Nested Schema : serviceMetrics
Type: object
Title: serviceMetrics
Service metrics with respective metrics.
Show Source
Nested Schema : errorRequests
Type: object
Title: errorRequests
Error Requests with respective metrics.
Show Source
Nested Schema : subServices
Type: array
Title: subServices
The list of subServices with respective metrics.
Show Source
Nested Schema : successRequests
Type: object
Title: successRequests
Success Requests with respective metrics..
Show Source
Nested Schema : metricData
Type: array
Title: metricData
The list of statuses with respective metrics.
Show Source
Nested Schema : status
Type: object
Title: status
Status
Show Source
Nested Schema : statusCode
Type: object
Title: statusCode
status Code with respective metrics.
Show Source
  • 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..
  • The total percentage of requests received from the total requests.
  • The total number of requests received from all the services or the specified service.
Nested Schema : subServices
Type: object
Title: subServices
Sub Services for each Service
Show Source
Nested Schema : service
Type: object
Title: service
service.
Show Source
Nested Schema : metricData
Type: array
Title: metricData
The list of statuses with respective metrics.
Show Source

400 Response

Invalid Input parameters
Body ()
Root Schema : schema
Type: string

401 Response

Invalid/Expired Token
Body ()
Root Schema : schema
Type: string

500 Response

Internal server error
Body ()
Root Schema : schema
Type: string
Back to Top

Examples

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
}
Back to Top