## Get diagnostics for a build `builds().diagnostics().list(DiagnosticListParamsparams = DiagnosticListParams.none(), RequestOptionsrequestOptions = RequestOptions.none()) : DiagnosticListPage` **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 - `params: DiagnosticListParams` - `buildId: Optional` Build ID - `cursor: Optional` Pagination cursor from a previous response - `limit: Optional` Maximum number of diagnostics to return, defaults to 100 (maximum: 100) - `severity: Optional` Includes the given severity and above (fatal > error > warning > note). - `FATAL("fatal")` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `targets: Optional` Optional comma-delimited list of language targets to filter diagnostics by ### Returns - `class BuildDiagnostic:` - `code: String` The kind of diagnostic. - `ignored: Boolean` Whether the diagnostic is ignored in the Stainless config. - `level: Level` The severity of the diagnostic. - `FATAL("fatal")` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `message: String` A description of the diagnostic. - `more: Optional` - `Markdown` - `markdown: String` - `type: JsonValue; "markdown"constant` - `MARKDOWN("markdown")` - `Raw` - `raw: String` - `type: JsonValue; "raw"constant` - `RAW("raw")` - `configRef: Optional` A JSON pointer to a relevant field in the Stainless config. - `oasRef: Optional` A JSON pointer to a relevant field in the OpenAPI spec. ### Example ```kotlin package com.configure_me_stainless_v0.api.example import com.configure_me_stainless_v0.api.client.StainlessClient import com.configure_me_stainless_v0.api.client.okhttp.StainlessOkHttpClient import com.configure_me_stainless_v0.api.models.builds.diagnostics.DiagnosticListPage import com.configure_me_stainless_v0.api.models.builds.diagnostics.DiagnosticListParams fun main() { val client: StainlessClient = StainlessOkHttpClient.fromEnv() val page: DiagnosticListPage = client.builds().diagnostics().list("buildId") } ``` #### Response ```json { "data": [ { "code": "code", "ignored": true, "level": "fatal", "message": "message", "more": { "markdown": "markdown", "type": "markdown" }, "config_ref": "config_ref", "oas_ref": "oas_ref" } ], "has_more": true, "next_cursor": "next_cursor" } ```