Skip to content
  • Auto
  • Light
  • Dark

List

Get diagnostics for a build
builds.diagnostics.list(strbuild_id, DiagnosticListParams**kwargs) -> SyncPage[codestrignoredboollevelliteralmessagestrconfig_refstroas_refstrDiagnosticListResponse]
get/v0/builds/{buildId}/diagnostics

Get diagnostics for a build

Parameters
build_idstr

Build ID

cursorstr
optional

Pagination cursor from a previous response

limitfloat
optional

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

exclusiveMinimum0
maximum100
severityliteral
optional
Literal["fatal", "error", "warning", "note"]

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

Hide ParametersShow Parameters
"fatal"
"error"
"warning"
"note"
targetslist
optional
List[Target]

Optional list of language targets to filter diagnostics by

Hide ParametersShow Parameters
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
Returns
DiagnosticListResponseclass
Hide ParametersShow Parameters
codestr
ignoredbool
levelliteral
Literal["fatal", "error", "warning", "note"]
Hide ParametersShow Parameters
"fatal"
"error"
"warning"
"note"
messagestr
config_refstr
optional
oas_refstr
optional
from stainless_v0 import Stainless

client = Stainless(
    api_key="My API Key",
)
page = client.builds.diagnostics.list(
    build_id="buildId",
)
page = page.data[0]
print(page.code)
200 Example
{
  "data": [
    {
      "code": "code",
      "ignored": true,
      "level": "fatal",
      "message": "message",
      "config_ref": "config_ref",
      "oas_ref": "oas_ref"
    }
  ],
  "has_more": true,
  "next_cursor": "next_cursor"
}