---
title: "Get a list of failure groups."
method: GET
path: "/api/failures/groups"
tags: ["Failures", "Develocity"]
---

# Get a list of failure groups.

`GET /api/failures/groups`

## Request

- Base URL: `https://develocity.example.com`
- URL: `https://develocity.example.com/api/failures/groups`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/develocity/apis/develocity-api/docs/api/failures/groups/get.ts> (a function with typed inputs; its response is checked against the schema)

**<mark>Beta:</mark>** Returns the list of failure groups.

## Query parameters

- `query` FailureGroupsQuery, required
  - `failureTypes` FailureType[]: Allows restricting the search to failure types. By default all failure types are considered.
  - `query` string, required: A query for filtering the builds considered for failure groups, written in the Develocity advanced search query language. The query must contain a restriction on `buildStartTime` to ensure the search is bounded in time. See: https://gradle.com/help/advanced-search
  - `maxFailureGroups` integer: The maximum number of failure groups to return.
  - `maxBuildIdsPerGroup` integer: The maximum number of buildIds to return in a given FailureGroup.

## Response `200`

A list of failure groups.

- FailureGroupsResponse: A list of failure groups.
  - `content` FailureGroup[], required: A list of failure groups.
    - `type` 'build' | 'test', required
    - `failureCount` integer, required: The number of failures in this group.
    - `firstOccurrence` string, date-time, required: The timestamp of the first occurrence of this failure group. This is the timestamp of the earliest failure that belongs to this group and therefore may be outside the time range of the query.
    - `lastOccurrence` string, date-time, required: The timestamp of the last occurrence of this failure group. This is the timestamp of the latest failure that belongs to this group and therefore may be outside the time range of the query.
    - `exampleFailure` Failure, required: An individual failure instance.
      - `message` string, required: The failure message.
      - `relevantLog` string, nullable: Relevant console log. `null` if no relevant console log has been found.
    - `buildIds` string[], required: Build Scan IDs for builds that contain failures that belong to this failure group.

## Other responses

- `400`: The request cannot be fulfilled due to a problem.
- `500`: The server encountered an unexpected error.

---

[API](https://skmtc.dev/develocity/apis/develocity-api.md) - [All operations](https://skmtc.dev/develocity/apis/develocity-api/llms.txt) - [OpenAPI document](https://skmtc.dev/develocity/apis/develocity-api/revisions/b49835fbf065?raw)
