# Builds ## List project builds `BuildListPage builds().list(BuildListParamsparams = BuildListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v0/builds` List user-triggered builds for a given project. An optional revision can be specified to filter by config commit SHA, or hashes of file contents. ### Parameters - `BuildListParams params` - `Optional project` Project name - `Optional branch` Branch name - `Optional cursor` Pagination cursor from a previous response. - `Optional limit` Maximum number of builds to return, defaults to 10 (maximum: 100). - `Optional revision` A config commit SHA used for the build - `String` - `class UnionMember1:` Hash of the files used for the build - `String hash` File content hash ### Returns - `class Build:` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional url` - `Optional lint` - `Optional test` - `Optional csharp` - `Optional go` - `Optional java` - `Optional kotlin` - `Optional node` - `Optional openAPI` - `Optional php` - `Optional python` - `Optional ruby` - `Optional sql` - `Optional terraform` - `Optional typescript` - `LocalDateTime updatedAt` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.builds.BuildListPage; import com.stainless.api.models.builds.BuildListParams; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.builder() .fromEnv() .project("example-project") .build(); BuildListPage page = client.builds().list(); } } ``` #### Response ```json { "data": [ { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } ], "has_more": true, "next_cursor": "next_cursor" } ``` ## Create build `Build builds().create(BuildCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v0/builds` Create a build, on top of a project branch, against a given input revision. The project branch will be modified so that its latest set of config files points to the one specified by the input revision. ### Parameters - `BuildCreateParams params` - `String project` Project name - `Revision revision` Specifies what to build: a branch name, commit SHA, merge command ("base..head"), or file contents. - `String` - `class UnionMember1:` File contents to commit directly - `Content` - `String content` File content - `Url` - `String url` URL to fetch file content from - `Optional allowEmpty` Whether to allow empty commits (no changes). Defaults to false. - `Optional branch` The project branch to use for the build. If not specified, the branch is inferred from the `revision`, and will 400 when that is not possible. - `Optional commitMessage` Optional commit message to use when creating a new commit. - `Optional enableAiCommitMessage` Whether to generate AI-powered commit messages for the build. Cannot be combined with `commit_message` or `target_commit_messages`. - `Optional targetCommitMessages` Optional commit messages to use for each SDK when making a new commit. SDKs not represented in this object will fallback to the optional `commit_message` parameter, or will fallback further to the default commit message. - `Optional cli` - `Optional csharp` - `Optional go` - `Optional java` - `Optional kotlin` - `Optional node` - `Optional openAPI` - `Optional php` - `Optional python` - `Optional ruby` - `Optional sql` - `Optional terraform` - `Optional typescript` - `Optional> targets` Optional list of SDK targets to build. If not specified, all configured targets will be built. - `NODE("node")` - `TYPESCRIPT("typescript")` - `PYTHON("python")` - `GO("go")` - `JAVA("java")` - `KOTLIN("kotlin")` - `RUBY("ruby")` - `TERRAFORM("terraform")` - `CLI("cli")` - `PHP("php")` - `CSHARP("csharp")` - `SQL("sql")` - `OPENAPI("openapi")` ### Returns - `class Build:` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional url` - `Optional lint` - `Optional test` - `Optional csharp` - `Optional go` - `Optional java` - `Optional kotlin` - `Optional node` - `Optional openAPI` - `Optional php` - `Optional python` - `Optional ruby` - `Optional sql` - `Optional terraform` - `Optional typescript` - `LocalDateTime updatedAt` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.builds.Build; import com.stainless.api.models.builds.BuildCreateParams; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.fromEnv(); BuildCreateParams params = BuildCreateParams.builder() .project("project") .revision("string") .build(); Build build = client.builds().create(params); } } ``` #### Response ```json { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Retrieve build `Build builds().retrieve(BuildRetrieveParamsparams = BuildRetrieveParams.none(), RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v0/builds/{buildId}` Retrieve a build by its ID. ### Parameters - `BuildRetrieveParams params` - `Optional buildId` Build ID ### Returns - `class Build:` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional url` - `Optional lint` - `Optional test` - `Optional csharp` - `Optional go` - `Optional java` - `Optional kotlin` - `Optional node` - `Optional openAPI` - `Optional php` - `Optional python` - `Optional ruby` - `Optional sql` - `Optional terraform` - `Optional typescript` - `LocalDateTime updatedAt` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.builds.Build; import com.stainless.api.models.builds.BuildRetrieveParams; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.fromEnv(); Build build = client.builds().retrieve("buildId"); } } ``` #### Response ```json { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } ``` ## Creates two comparable builds `BuildCompareResponse builds().compare(BuildCompareParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/v0/builds/compare` Create two builds whose outputs can be directly compared with each other. Created builds _modify_ their project branches so that their latest sets of config files point to the ones specified by the input revision. This endpoint is useful because a build has more inputs than the set of config files it uses, so comparing two builds directly may return spurious differences. Builds made via this endpoint are guaranteed to have differences arising from the set of config files, and any custom code. ### Parameters - `BuildCompareParams params` - `Base base` Parameters for the base build - `String branch` Branch to use. When using a branch name as revision, this must match or be omitted. - `Revision revision` Specifies what to build: a branch name, a commit SHA, or file contents. - `String` - `class UnionMember1:` File contents to commit directly - `Content` - `String content` File content - `Url` - `String url` URL to fetch file content from - `Optional commitMessage` Optional commit message to use when creating a new commit. - `Head head` Parameters for the head build - `String branch` Branch to use. When using a branch name as revision, this must match or be omitted. - `Revision revision` Specifies what to build: a branch name, a commit SHA, or file contents. - `String` - `class UnionMember1:` File contents to commit directly - `Content` - `Url` - `Optional commitMessage` Optional commit message to use when creating a new commit. - `String project` Project name - `Optional> targets` Optional list of SDK targets to build. If not specified, all configured targets will be built. - `NODE("node")` - `TYPESCRIPT("typescript")` - `PYTHON("python")` - `GO("go")` - `JAVA("java")` - `KOTLIN("kotlin")` - `RUBY("ruby")` - `TERRAFORM("terraform")` - `CLI("cli")` - `PHP("php")` - `CSHARP("csharp")` - `SQL("sql")` - `OPENAPI("openapi")` ### Returns - `class BuildCompareResponse:` - `Build base` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional url` - `Optional lint` - `Optional test` - `Optional csharp` - `Optional go` - `Optional java` - `Optional kotlin` - `Optional node` - `Optional openAPI` - `Optional php` - `Optional python` - `Optional ruby` - `Optional sql` - `Optional terraform` - `Optional typescript` - `LocalDateTime updatedAt` - `Build head` ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.builds.BuildCompareParams; import com.stainless.api.models.builds.BuildCompareResponse; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.fromEnv(); BuildCompareParams params = BuildCompareParams.builder() .base(BuildCompareParams.Base.builder() .branch("branch") .revision("string") .build()) .head(BuildCompareParams.Head.builder() .branch("branch") .revision("string") .build()) .project("project") .build(); BuildCompareResponse response = client.builds().compare(params); } } ``` #### Response ```json { "base": { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" }, "head": { "id": "id", "config_commit": "config_commit", "created_at": "2019-12-27T18:11:19.117Z", "documented_spec": { "content": "content", "type": "content" }, "object": "build", "org": "org", "project": "project", "targets": { "cli": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "csharp": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "go": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "java": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "kotlin": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "node": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "openapi": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "php": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "python": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "ruby": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "sql": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "terraform": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } }, "typescript": { "commit": { "status": "not_started" }, "install_url": "install_url", "object": "build_target", "status": "not_started", "build": { "status": "not_started" }, "lint": { "status": "not_started" }, "test": { "status": "not_started" } } }, "updated_at": "2019-12-27T18:11:19.117Z" } } ``` ## Domain Types ### Build - `class Build:` - `String id` Build ID - `String configCommit` - `LocalDateTime createdAt` - `Optional documentedSpec` - `class UnionMember0:` - `String content` - `Type type` - `CONTENT("content")` - `class UnionMember1:` - `LocalDateTime expires` - `Type type` - `URL("url")` - `String url` - `Object object_` - `BUILD("build")` - `String org` - `String project` - `Targets targets` - `Optional cli` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional url` - `Optional lint` - `Optional test` - `Optional csharp` - `Optional go` - `Optional java` - `Optional kotlin` - `Optional node` - `Optional openAPI` - `Optional php` - `Optional python` - `Optional ruby` - `Optional sql` - `Optional terraform` - `Optional typescript` - `LocalDateTime updatedAt` ### Build Target - `class BuildTarget:` - `Commit commit` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `JsonValue;` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `JsonValue;` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `class Completed:` - `Optional commit` - `Repo repo` - `String branch` - `String host` - `String name` - `String owner` - `String sha` - `Optional stats` - `long additions` - `long deletions` - `long total` - `Optional treeOid` - `InnerCompleted completed` deprecated - `Optional commit` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `LocalDateTime completedAt` - `Conclusion conclusion` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `SUCCESS("success")` - `MERGE_CONFLICT("merge_conflict")` - `UPSTREAM_MERGE_CONFLICT("upstream_merge_conflict")` - `FATAL("fatal")` - `PAYMENT_REQUIRED("payment_required")` - `CANCELLED("cancelled")` - `TIMED_OUT("timed_out")` - `NOOP("noop")` - `VERSION_BUMP("version_bump")` - `Optional mergeConflictPr` - `double number` - `Repo repo` - `String host` - `String name` - `String owner` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional installUrl` - `Object object_` - `BUILD_TARGET("build_target")` - `Status status` - `NOT_STARTED("not_started")` - `CODEGEN("codegen")` - `POSTGEN("postgen")` - `COMPLETED("completed")` - `Optional build` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional url` - `Optional lint` - `Optional test` ### Check Step - `class CheckStep: A class that can be one of several variants.union` - `JsonValue;` - `JsonValue; status "not_started"constant` - `NOT_STARTED("not_started")` - `Queued` - `JsonValue; status "queued"constant` - `QUEUED("queued")` - `Optional url` - `InProgress` - `JsonValue; status "in_progress"constant` - `IN_PROGRESS("in_progress")` - `Optional url` - `Completed` - `InnerCompleted completed` deprecated - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `Optional url` - `Conclusion conclusion` - `SUCCESS("success")` - `FAILURE("failure")` - `SKIPPED("skipped")` - `CANCELLED("cancelled")` - `ACTION_REQUIRED("action_required")` - `NEUTRAL("neutral")` - `TIMED_OUT("timed_out")` - `JsonValue; status "completed"constant` - `COMPLETED("completed")` - `Optional url` # Diagnostics ## 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. ### Parameters - `DiagnosticListParams params` - `Optional buildId` Build ID - `Optional cursor` Pagination cursor from a previous response - `Optional limit` Maximum number of diagnostics to return, defaults to 100 (maximum: 100) - `Optional severity` Includes the given severity and above (fatal > error > warning > note). - `FATAL("fatal")` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `Optional targets` Optional comma-delimited list of language targets to filter diagnostics by ### Returns - `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. - `FATAL("fatal")` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `String message` A description of the diagnostic. - `Optional more` - `Markdown` - `String markdown` - `JsonValue; type "markdown"constant` - `MARKDOWN("markdown")` - `Raw` - `String raw` - `JsonValue; type "raw"constant` - `RAW("raw")` - `Optional configRef` A JSON pointer to a relevant field in the Stainless config. - `Optional oasRef` A JSON pointer to a relevant field in the OpenAPI spec. ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.builds.diagnostics.DiagnosticListPage; import com.stainless.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"); } } ``` #### 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 - `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. - `FATAL("fatal")` - `ERROR("error")` - `WARNING("warning")` - `NOTE("note")` - `String message` A description of the diagnostic. - `Optional more` - `Markdown` - `String markdown` - `JsonValue; type "markdown"constant` - `MARKDOWN("markdown")` - `Raw` - `String raw` - `JsonValue; type "raw"constant` - `RAW("raw")` - `Optional configRef` A JSON pointer to a relevant field in the Stainless config. - `Optional oasRef` A JSON pointer to a relevant field in the OpenAPI spec. ### Build Diagnostic More - `class BuildDiagnosticMore: A class that can be one of several variants.union` - `Markdown` - `String markdown` - `JsonValue; type "markdown"constant` - `MARKDOWN("markdown")` - `Raw` - `String raw` - `JsonValue; type "raw"constant` - `RAW("raw")` # Target Outputs ## Download build target output `TargetOutputRetrieveResponse builds().targetOutputs().retrieve(TargetOutputRetrieveParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **get** `/v0/build_target_outputs` Retrieve a method to download an output for a given build target. If the requested type of output is `source`, and the requested output method is `url`, a download link to a tarball of the source files is returned. If the requested output method is `git`, a Git remote, ref, and access token (if necessary) is returned. Otherwise, the possible types of outputs are specific to the requested target, and the output method _must_ be `url`. See the documentation for `type` for more information. ### Parameters - `TargetOutputRetrieveParams params` - `String buildId` Build ID - `Target target` SDK language target name - `NODE("node")` - `TYPESCRIPT("typescript")` - `PYTHON("python")` - `GO("go")` - `JAVA("java")` - `KOTLIN("kotlin")` - `RUBY("ruby")` - `TERRAFORM("terraform")` - `CLI("cli")` - `PHP("php")` - `CSHARP("csharp")` - `SQL("sql")` - `OPENAPI("openapi")` - `Type type` - `SOURCE("source")` - `DIST("dist")` - `WHEEL("wheel")` - `OPENAPI_WITH_TRANSFORMS("openapi-with-transforms")` - `OPENAPI_WITH_CODE_SAMPLES("openapi-with-code-samples")` - `OPENAPI_SDK_SPEC("openapi-sdk-spec")` - `FILE("file")` - `Optional output` Output format: url (download URL) or git (temporary access token). - `URL("url")` - `GIT("git")` - `Optional path` The path of the file to get when used with "type": "file". ### Returns - `class TargetOutputRetrieveResponse: A class that can be one of several variants.union` - `Url` - `JsonValue; output "url"constant` - `URL("url")` - `Target target` - `NODE("node")` - `TYPESCRIPT("typescript")` - `PYTHON("python")` - `GO("go")` - `JAVA("java")` - `KOTLIN("kotlin")` - `RUBY("ruby")` - `TERRAFORM("terraform")` - `CLI("cli")` - `PHP("php")` - `CSHARP("csharp")` - `SQL("sql")` - `OPENAPI("openapi")` - `Type type` - `SOURCE("source")` - `DIST("dist")` - `WHEEL("wheel")` - `OPENAPI_WITH_TRANSFORMS("openapi-with-transforms")` - `OPENAPI_WITH_CODE_SAMPLES("openapi-with-code-samples")` - `OPENAPI_SDK_SPEC("openapi-sdk-spec")` - `FILE("file")` - `String url` URL for direct download - `Optional path` The path of the file, which is only present when using with the type "file" option. - `Git` - `String token` Temporary GitHub access token - `JsonValue; output "git"constant` - `GIT("git")` - `String ref` Git reference (commit SHA, branch, or tag) - `Target target` - `Type type` - `SOURCE("source")` - `DIST("dist")` - `WHEEL("wheel")` - `OPENAPI_WITH_TRANSFORMS("openapi-with-transforms")` - `OPENAPI_WITH_CODE_SAMPLES("openapi-with-code-samples")` - `OPENAPI_SDK_SPEC("openapi-sdk-spec")` - `FILE("file")` - `String url` URL to git remote ### Example ```java package com.stainless.api.example; import com.stainless.api.client.StainlessClient; import com.stainless.api.client.okhttp.StainlessOkHttpClient; import com.stainless.api.models.builds.targetoutputs.TargetOutputRetrieveParams; import com.stainless.api.models.builds.targetoutputs.TargetOutputRetrieveResponse; public final class Main { private Main() {} public static void main(String[] args) { StainlessClient client = StainlessOkHttpClient.fromEnv(); TargetOutputRetrieveParams params = TargetOutputRetrieveParams.builder() .buildId("build_id") .target(TargetOutputRetrieveParams.Target.NODE) .type(TargetOutputRetrieveParams.Type.SOURCE) .build(); TargetOutputRetrieveResponse targetOutput = client.builds().targetOutputs().retrieve(params); } } ``` #### Response ```json { "output": "url", "target": "node", "type": "source", "url": "url", "path": "path" } ```