---
title: "Get Environment Analytics for top failed v2 and v4 APIs"
method: GET
path: "/analytics/top-failed-apis"
tags: ["API Analytics"]
---

# Get Environment Analytics for top failed v2 and v4 APIs

`GET /analytics/top-failed-apis`

## Request

- Base URL: `/management/v2/environments/DEFAULT` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/management/v2/environments/DEFAULT/analytics/top-failed-apis`
- Auth: one of:
  - HTTP basic
  - API key in cookie `Auth-Graviteeio-APIM`

Get Environment Analytics for top failed v2 and v4 APIs 

User must have the API_ANALYTICS[READ] permission.

## Response `200`

Analytics for top failed v2 and v4 APIs based on 5xx status calls

- object: Analytics for top failed v2 and v4 APIs based on 5xx status calls
  - `data` TopFailedApis[]: List of top failed APIs results
    - `id` string: The Application ID
    - `definitionVersion` string: The API definition version
    - `name` string: The Application Name
    - `failedCalls` integer: Number of 5xx calls for the API
    - `failedCallsRatio` number, double: Ratio of failed API calls to the total number of calls

## Other responses

- `default`: Generic error response

---

[API](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments.md) - [All operations](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments/llms.txt) - [OpenAPI document](https://skmtc.dev/gravitee-io/apis/gravitee-io-apim-management-api-environments/revisions/b736a7e375df?raw)
