Skip to content
FeedbackDashboard

Get diagnostics for a build

DiagnosticListPage builds().diagnostics().list(DiagnosticListParamsparams = DiagnosticListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
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 params
Optional<String> buildId

Build ID

Optional<String> cursor

Pagination cursor from a previous response

Optional<Double> limit

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

exclusiveMinimum0
maximum100
Optional<Severity> severity

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

FATAL("fatal")
ERROR("error")
WARNING("warning")
NOTE("note")
Optional<String> targets

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

ReturnsExpand Collapse
class BuildDiagnostic:
String code

The kind of diagnostic.

boolean ignored

Whether the diagnostic is ignored in the Stainless config.

Level level

The severity of the diagnostic.

Accepts one of the following:
FATAL("fatal")
ERROR("error")
WARNING("warning")
NOTE("note")
String message

A description of the diagnostic.

Optional<BuildDiagnosticMore> more
Accepts one of the following:
Markdown
String markdown
JsonValue; type "markdown"constant"markdown"constant
Raw
String raw
JsonValue; type "raw"constant"raw"constant
Optional<String> configRef

A JSON pointer to a relevant field in the Stainless config.

Optional<String> oasRef

A JSON pointer to a relevant field in the OpenAPI spec.

Get diagnostics for a build
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;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        StainlessClient client = StainlessOkHttpClient.fromEnv();

        DiagnosticListPage page = client.builds().diagnostics().list("buildId");
    }
}
{
  "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"
}