# Diagnostics ## Get diagnostics for a build `$client->builds->diagnostics->list(string buildID, ?string cursor, ?float limit, ?Severity severity, ?string targets): Page` **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 - `buildID: string` Build ID - `cursor?:optional string` Pagination cursor from a previous response - `limit?:optional float` Maximum number of diagnostics to return, defaults to 100 (maximum: 100) - `severity?:optional Severity` Includes the given severity and above (fatal > error > warning > note). - `targets?:optional string` Optional comma-delimited list of language targets to filter diagnostics by ### Returns - `BuildDiagnostic` - `string code` The kind of diagnostic. - `bool ignored` Whether the diagnostic is ignored in the Stainless config. - `Level level` The severity of the diagnostic. - `string message` A description of the diagnostic. - `?BuildDiagnosticMore more` - `?string configRef` A JSON pointer to a relevant field in the Stainless config. - `?string oasRef` A JSON pointer to a relevant field in the OpenAPI spec. ### Example ```php builds->diagnostics->list( 'buildId', cursor: 'cursor', limit: 1, severity: 'fatal', targets: 'targets' ); var_dump($page); ``` #### 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" } ``` ## Domain Types ### Build Diagnostic - `BuildDiagnostic` - `string code` The kind of diagnostic. - `bool ignored` Whether the diagnostic is ignored in the Stainless config. - `Level level` The severity of the diagnostic. - `string message` A description of the diagnostic. - `?BuildDiagnosticMore more` - `?string configRef` A JSON pointer to a relevant field in the Stainless config. - `?string oasRef` A JSON pointer to a relevant field in the OpenAPI spec. ### Build Diagnostic More - `BuildDiagnosticMore` - `Markdown` - `string markdown` - `"markdown" type` - `Raw` - `string raw` - `"raw" type`