---
title: "Get Build Stats"
method: GET
path: "/api/v1/factory/stats/builds"
tags: ["stats"]
---

# Get Build Stats

`GET /api/v1/factory/stats/builds`

## Request

- The document declares no server URL.
- Auth: one of:
  - HTTP bearer
  - HTTP basic

Builds created since ``since``, summarized per system and per
catalog.

The systems summary feeds the overview's status strip and the
catalogs summary its breakdown table. Every row carries the six
status counts and the seconds its completed builds took to turn
around. Each count agrees with the total
``GET /builds?status=…&since=…`` reports for the same window
narrowed to that system, or with the feed's rows grouped by
catalog.

## Query parameters

- `since` string, date-time, required: Summarize builds created at or after this time (inclusive). An ISO 8601 timestamp carrying a UTC offset, e.g. '2026-07-17T08:30:00Z'.

## Response `200`

Successful Response

- BuildStatsResponse: The builds created in a window, summarized per system and per catalog. ``systems`` lists every system the catalog knows, sorted by name and zero-padded. ``catalogs`` lists only the catalogs with at least one build in the window, sorted by name. The two lists partition the same builds, so their per-status sums agree.
  - `systems` SystemBuildStats[], required
    - `counts` BuildStatusCounts, required: How many builds sit in each effective status. The fields are named exactly as the build feed's ``status`` filter values, so each count links into the feed under its own key.
      - `pending` integer, required
      - `running` integer, required
      - `completed` integer, required
      - `failed` integer, required
      - `timed_out` integer, required
      - `cancelled` integer, required
    - `completed_seconds` integer, required
    - `system` string, required
  - `catalogs` CatalogBuildStats[], required
    - `counts` BuildStatusCounts, required: How many builds sit in each effective status. The fields are named exactly as the build feed's ``status`` filter values, so each count links into the feed under its own key.
      - `pending` integer, required
      - `running` integer, required
      - `completed` integer, required
      - `failed` integer, required
      - `timed_out` integer, required
      - `cancelled` integer, required
    - `completed_seconds` integer, required
    - `catalog` string, required

## Other responses

- `422`: Unprocessable Entity

## Changes

- **2026-10-01** `76701e311542`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/flox/apis/flox-factory-service/changes/api/v1/factory/stats/builds/get.md)

---

[API](https://skmtc.dev/flox/apis/flox-factory-service.md) - [All operations](https://skmtc.dev/flox/apis/flox-factory-service/llms.txt) - [OpenAPI document](https://skmtc.dev/flox/apis/flox-factory-service/revisions/a0a0401010b7?raw)
