Skip to content
FeedbackDashboard

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.

ParametersExpand Collapse
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")
OPENAPI("openapi")
Type type
SOURCE("source")
DIST("dist")
WHEEL("wheel")
Optional<Output> output

Output format: url (download URL) or git (temporary access token).

URL("url")
GIT("git")
ReturnsExpand Collapse
class TargetOutputRetrieveResponse: A class that can be one of several variants.union
Url
JsonValue; output "url"constant"url"constant
Target target
Accepts one of the following:
NODE("node")
TYPESCRIPT("typescript")
PYTHON("python")
GO("go")
JAVA("java")
KOTLIN("kotlin")
RUBY("ruby")
TERRAFORM("terraform")
CLI("cli")
PHP("php")
CSHARP("csharp")
OPENAPI("openapi")
Type type
Accepts one of the following:
SOURCE("source")
DIST("dist")
WHEEL("wheel")
String url

URL for direct download

Git
String token

Temporary GitHub access token

JsonValue; output "git"constant"git"constant
String ref

Git reference (commit SHA, branch, or tag)

Target target
Accepts one of the following:
NODE("node")
TYPESCRIPT("typescript")
PYTHON("python")
GO("go")
JAVA("java")
KOTLIN("kotlin")
RUBY("ruby")
TERRAFORM("terraform")
CLI("cli")
PHP("php")
CSHARP("csharp")
OPENAPI("openapi")
Type type
Accepts one of the following:
SOURCE("source")
DIST("dist")
WHEEL("wheel")
String url

URL to git remote

Download build target output
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.targetoutputs.TargetOutputRetrieveParams;
import com.configure_me_stainless_v0.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);
    }
}
{
  "output": "url",
  "target": "node",
  "type": "source",
  "url": "url"
}
Returns Examples
{
  "output": "url",
  "target": "node",
  "type": "source",
  "url": "url"
}