Skip to content
FeedbackDashboard

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.

ParametersExpand Collapse
params: DiagnosticListParams
buildId: Optional<String>

Build ID

cursor: Optional<String>

Pagination cursor from a previous response

limit: Optional<Double>

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

exclusiveMinimum0
maximum100
severity: Optional<Severity>

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

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

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

ReturnsExpand Collapse
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.

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

A description of the diagnostic.

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

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

oasRef: Optional<String>

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

fun main() {
    val client: StainlessClient = StainlessOkHttpClient.fromEnv()

    val page: DiagnosticListPage = 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"
}