> ## Documentation Index
> Fetch the complete documentation index at: https://docs.empirical.run/llms.txt
> Use this file to discover all available pages before exploring further.

# List failure groups

> Returns a paginated list of failure groups for the scoped project, newest sighting first. Use this to match a failure against an existing group before creating a new one.



## OpenAPI

````yaml /api-reference/openapi.generated.json get /api/failure-groups
openapi: 3.1.0
info:
  title: Empirical API
  version: 1.0.0
  description: Programmatic access to Empirical test runs, snoozes, and more.
  contact:
    name: Empirical
    url: https://empirical.run
servers:
  - url: https://api.empirical.run
security:
  - Bearer: []
tags:
  - name: Test Runs
    description: Trigger, list, and inspect end-to-end test runs.
  - name: Test Cases
    description: >-
      Browse the Playwright test cases synced from a project's repository and
      manage their tags.
  - name: Environments
    description: >-
      Named deployment targets (slug + Playwright project filters) a project's
      tests run against.
  - name: Snoozes
    description: Temporarily suppress known test failures for specific Playwright tests.
  - name: Analytics
    description: Aggregated test-run, test-count and test-case analytics for a project.
  - name: Resources
    description: >-
      Project file resources — uploads stored in R2 and external link-type files
      (e.g. Google Sheets).
  - name: Failure Groups
    description: >-
      Durable, cross-run identities for failure modes, carrying the latest
      triage diagnosis.
  - name: Badges
    description: Public README status badge images (SVG) for project environments.
paths:
  /api/failure-groups:
    get:
      tags:
        - Failure Groups
      summary: List failure groups
      description: >-
        Returns a paginated list of failure groups for the scoped project,
        newest sighting first. Use this to match a failure against an existing
        group before creating a new one.
      operationId: listFailureGroups
      parameters:
        - schema:
            type: integer
            minimum: 1
            default: 1
            description: Page number (1-indexed).
          required: false
          description: Page number (1-indexed).
          name: page
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            description: Items per page (max 100).
          required: false
          description: Items per page (max 100).
          name: per_page
          in: query
        - schema:
            type: string
            enum:
              - open
              - resolved
            description: Filter by lifecycle status.
          required: false
          description: Filter by lifecycle status.
          name: status
          in: query
      responses:
        '200':
          description: Paginated failure groups.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailureGroupListResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    FailureGroupListResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            failure_groups:
              type: array
              items:
                $ref: '#/components/schemas/FailureGroup'
          required:
            - failure_groups
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - data
        - pagination
    ErrorResponse:
      type: object
      properties:
        data:
          nullable: true
          description: Always null for error responses.
        error:
          type: object
          properties:
            message:
              type: string
              description: Human-readable error message.
          required:
            - message
          description: Error details.
      required:
        - data
        - error
    FailureGroup:
      type: object
      properties:
        id:
          type: string
        project_id:
          type: integer
        label:
          type: string
        type:
          type: string
          enum:
            - app
            - test
            - unknown
        status:
          type: string
          enum:
            - open
            - resolved
        diagnosis:
          type: string
          nullable: true
        recommendation:
          type: string
          nullable: true
        fingerprint:
          $ref: '#/components/schemas/Fingerprint'
        matcher:
          $ref: '#/components/schemas/FailureGroupMatcher'
        resolved_at:
          type: string
          nullable: true
        first_seen_at:
          type: string
        last_seen_at:
          type: string
        last_test_run_id:
          type: integer
          nullable: true
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - project_id
        - label
        - type
        - status
        - diagnosis
        - recommendation
        - fingerprint
        - matcher
        - resolved_at
        - first_seen_at
        - last_seen_at
        - last_test_run_id
        - created_at
        - updated_at
    Pagination:
      type: object
      properties:
        page:
          type: integer
          description: Current page (1-indexed).
        per_page:
          type: integer
          description: Items per page.
        total:
          type: integer
          description: Total number of items.
        total_pages:
          type: integer
          description: Total number of pages.
      required:
        - page
        - per_page
        - total
        - total_pages
      description: Pagination metadata.
    Fingerprint:
      type: object
      nullable: true
      properties:
        signals:
          type: array
          items:
            type: object
            properties:
              kind:
                type: string
              value:
                type: string
              match:
                type: string
                enum:
                  - exact
                  - contains
                  - glob
                  - regex
              weight:
                type: number
              source:
                type: string
                enum:
                  - machine
                  - agent
                  - human
              data:
                type: object
                additionalProperties:
                  nullable: true
            required:
              - kind
              - value
              - source
      required:
        - signals
    FailureGroupMatcher:
      type: object
      nullable: true
      properties:
        source:
          type: string
          minLength: 1
          maxLength: 32768
          description: >-
            Plain-JS async function source: `async ({ testRun, testCase,
            traceUtils }) => boolean`.
        description:
          type: string
          minLength: 1
          maxLength: 1024
          description: >-
            Human-readable summary of what the matcher matches and why;
            re-articulated on every edit.
        contract_version:
          type: integer
          minimum: 1
          default: 1
          description: Input-contract version the source was written against.
      required:
        - source
        - description
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer

````