Skip to content
FeedbackDashboard

Download build target output

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.

Query ParametersExpand Collapse
build_id: string

Build ID

target: "node" or "typescript" or "python" or 8 more

SDK language target name

Accepts one of the following:
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
type: "source" or "dist" or "wheel"
Accepts one of the following:
"source"
"dist"
"wheel"
output: optional "url" or "git"

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

Accepts one of the following:
"url"
"git"
ReturnsExpand Collapse
URL = object { output, target, type, url }
output: "url"
target: Target
Accepts one of the following:
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
type: "source" or "dist" or "wheel"
Accepts one of the following:
"source"
"dist"
"wheel"
url: string

URL for direct download

Git = object { token, output, ref, 3 more }
token: string

Temporary GitHub access token

output: "git"
ref: string

Git reference (commit SHA, branch, or tag)

target: Target
Accepts one of the following:
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
type: "source" or "dist" or "wheel"
Accepts one of the following:
"source"
"dist"
"wheel"
url: string

URL to git remote

Download build target output
curl https://api.stainless.com/v0/build_target_outputs \
    -H "Authorization: Bearer $STAINLESS_API_KEY"
{
  "output": "url",
  "target": "node",
  "type": "source",
  "url": "url"
}
Returns Examples
{
  "output": "url",
  "target": "node",
  "type": "source",
  "url": "url"
}