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
  • The name of the service for which the metrics data is retrieved. There is no default value.
    Example:
    webserver
  • 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
  • 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 : errorMetricOverview
Type: object
Error metrics.
Show Source
Nested Schema : errorMetrics
Type: object
Title: errorMetrics
The error metrics object.
Show Source
Nested Schema : subComponents
Type: array
Title: subComponents
The list of subcomponents with their respective metrics.
Show Source
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
Nested Schema : subComponents
Type: object
Title: subComponents
sub Components.
Show Source
Nested Schema : components
Type: object
Title: components
components.
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 : topRequests
Type: object
Title: topRequests
Top Requests.
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.

400 Response

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