---
title: "Get diagnostics for a build"
method: GET
path: "/v0/builds/{buildId}/diagnostics"
---

# Get diagnostics for a build

`GET /v0/builds/{buildId}/diagnostics`

Get the list of diagnostics for a given build.

If no language targets are specified, diagnostics for all languages are returned.

## Path parameters

- `buildId` string, required — Build ID

## Query parameters

- `targets` string — Optional comma-delimited list of language targets to filter diagnostics by
- `severity` 'fatal' | 'error' | 'warning' | 'note' — Includes the given severity and above (fatal > error > warning > note).
- `cursor` string — Pagination cursor from a previous response
- `limit` number — Maximum number of diagnostics to return, defaults to 100 (maximum: 100)

## Response `200`

success

- object
  - `data` BuildDiagnostic[], required
    - `code` string, required — The kind of diagnostic.
    - `level` 'fatal' | 'error' | 'warning' | 'note', required — The severity of the diagnostic.
    - `ignored` boolean, required — Whether the diagnostic is ignored in the Stainless config.
    - `message` string, required — A description of the diagnostic.
    - `more` union, required
      - object
        - `type` 'markdown', required
        - `markdown` string, required
      - object
        - `type` 'raw', required
        - `raw` string, required
    - `oas_ref` string — A JSON pointer to a relevant field in the OpenAPI spec.
    - `config_ref` string — A JSON pointer to a relevant field in the Stainless config.
  - `has_more` boolean, required
  - `next_cursor` string

---

[API](https://skmtc.net/stainless-api/apis/my-api.md) · [All operations](https://skmtc.net/stainless-api/apis/my-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stainless-api/my-api/versions/1d73a351f557/schema)
