## List `builds.diagnostics.list(strbuild_id, DiagnosticListParams**kwargs) -> SyncPage[BuildDiagnostic]` **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. ### Parameters - `build_id: str` Build ID - `cursor: Optional[str]` Pagination cursor from a previous response - `limit: Optional[float]` Maximum number of diagnostics to return, defaults to 100 (maximum: 100) - `severity: Optional[Literal["fatal", "error", "warning", "note"]]` Includes the given severity and above (fatal > error > warning > note). - `"fatal"` - `"error"` - `"warning"` - `"note"` - `targets: Optional[str]` Optional comma-delimited list of language targets to filter diagnostics by ### Returns - `class BuildDiagnostic: …` - `code: str` The kind of diagnostic. - `ignored: bool` Whether the diagnostic is ignored in the Stainless config. - `level: Literal["fatal", "error", "warning", "note"]` The severity of the diagnostic. - `"fatal"` - `"error"` - `"warning"` - `"note"` - `message: str` A description of the diagnostic. - `more: Optional[BuildDiagnosticMore]` - `class Markdown: …` - `markdown: str` - `type: Literal["markdown"]` - `"markdown"` - `class Raw: …` - `raw: str` - `type: Literal["raw"]` - `"raw"` - `config_ref: Optional[str]` A JSON pointer to a relevant field in the Stainless config. - `oas_ref: Optional[str]` A JSON pointer to a relevant field in the OpenAPI spec. ### Example ```python import os from stainless_v0 import Stainless client = Stainless( api_key=os.environ.get("STAINLESS_API_KEY"), # This is the default and can be omitted ) page = client.builds.diagnostics.list( build_id="buildId", ) page = page.data[0] print(page.code) ```