Skip to content
FeedbackDashboard

Get diagnostics for a build

DiagnosticListPageResponse Builds.Diagnostics.List(DiagnosticListParamsparameters, CancellationTokencancellationToken = default)
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.

ParametersExpand Collapse
DiagnosticListParams parameters
required string buildID

Build ID

string cursor

Pagination cursor from a previous response

Double limit

Maximum number of diagnostics to return, defaults to 100 (maximum: 100)

exclusiveMinimum0
maximum100
Severity severity

Includes the given severity and above (fatal > error > warning > note).

"fatal"Fatal
"error"Error
"warning"Warning
"note"Note
string targets

Optional comma-delimited list of language targets to filter diagnostics by

ReturnsExpand Collapse
class DiagnosticListPageResponse:
required IReadOnlyList<BuildDiagnostic> Data
required string Code

The kind of diagnostic.

required Boolean Ignored

Whether the diagnostic is ignored in the Stainless config.

required Level Level

The severity of the diagnostic.

Accepts one of the following:
"fatal"Fatal
"error"Error
"warning"Warning
"note"Note
required string Message

A description of the diagnostic.

required BuildDiagnosticMore? More
Accepts one of the following:
Markdown
required string Markdown
JsonElement Type "markdown"constant
Raw
required string Raw
JsonElement Type "raw"constant
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.

required Boolean HasMore
string NextCursor

Get diagnostics for a build

DiagnosticListParams parameters = new() { BuildID = "buildId" };

var page = await client.Builds.Diagnostics.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
{
  "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"
}
Returns Examples
{
  "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"
}