Get error metrics for a group of statuses for a service
get
/v1/errormetrics/{status}/{serviceName}
Gets the error metrics for group of statuses at the URL-level for a given site for a given service name in a given time interval.
Request
Path Parameters
-
serviceName(required): string
The name of the service for which the metrics data is retrieved. There is no default value.Example:
webserver
-
status(required): string
The string to filter the metrics data based on status groups such as 4XX or 5XX. There is no default value.Example:
4XX
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 : errorMetricOverview
Type:
object
Error metrics.
Show Source
-
errorMetrics: object
errorMetrics
Title:
errorMetrics
The error metrics object. -
serviceName: string
The component or service name for which the metrics data is retrieved.
-
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 : errorMetrics
Type:
object
Title:
errorMetrics
The error metrics object.
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..
-
subComponents: array
subComponents
Title:
subComponents
The list of subcomponents with their respective metrics. -
topRequests: array
topRequests
Title:
topRequests
The list of top requests for each status code in the status group with their respective metrics. -
totalRequests: number
The total number of requests received from all the services or the specified service.
Nested Schema : subComponents
Type:
array
Title:
subComponents
The list of subcomponents with their respective metrics.
Show Source
-
Array of:
object subComponents
Title:
subComponents
sub Components.
Nested Schema : topRequests
Type:
array
Title:
topRequests
The list of top requests for each status code in the status group with their respective metrics.
Show Source
-
Array of:
object topRequests
Title:
topRequests
Top Requests.
Nested Schema : subComponents
Type:
object
Title:
subComponents
sub Components.
Show Source
-
components: object
components
Title:
components
components.
Nested Schema : components
Type:
object
Title:
components
components.
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 : topRequests
Type:
object
Title:
topRequests
Top Requests.
Show Source
-
statusCode: object
statusCode
Title:
statusCode
status Code with respective metrics.
Nested Schema : statusCode
Type:
object
Title:
statusCode
status 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.
400 Response
Invalid Input parameters
Root Schema : schema
Type:
string
500 Response
Internal server error
Root Schema : schema
Type:
string
Examples
The following example shows how to get error metrics for a given site for the 'webserver' service for the '4XX' status group.
cURL Command Example
curl -X GET "https://mysite.example.com/v1/errormetrics/4XX/webserver" -H "Authorization: Bearer HMeyJraWQiOiIxMDAwZXllc19sbiIsImFsZyI6Il"
Response Body Example
The following shows an example of the response body in JSON format.
{
"errorMetrics": {
"totalRequests": 120,
"averageLatency": 17,
"topRequests": [
{
"404": {
"totalRequests": 120,
"averageLatency": 17,
"totalPercentage": 100.0,
"Urls": [
{
"url": "/euf/core/3.9/thirdParty/js/moment.min.js.map",
"count": 120
}
]
}
}
],
"subComponents": [
{
"other": {
"totalRequests": 120,
"averageLatency": 17,
"totalPercentage": 100.0
}
}
]
},
"serviceName": "webserver",
"siteName": "my_site",
"updatedTime": "2025-01-28T07:59:00Z",
"timeInterval": 120
}