Skip to content
FeedbackDashboard

Download build target output

$ stl builds:target-outputs retrieve
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 or content. See the documentation for type for more information.

The content output method returns the raw content of the output inline, instead of a download URL, and is only supported for the openapi-* and file types.

ParametersExpand Collapse
--build-id: string

Build ID

--target: "node" or "typescript" or "python" or 10 more

SDK language target name

--type: "source" or "dist" or "wheel" or 4 more
--output: optional "url" or "git" or "content"

Output format: url (download URL), git (temporary access token), or content (raw content returned inline, only supported for the “openapi-*” and “file” types).

--path: optional string

The path of the file to get when used with “type”: “file”.

ReturnsExpand Collapse
BuildTargetOutputGetResponse: object { output, target, type, 2 more } or object { token, output, ref, 3 more } or object { content, output, target, 2 more }
url: object { output, target, type, 2 more }
output: "url"
target: "node" or "typescript" or "python" or 10 more
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
"sql"
"openapi"
type: "source" or "dist" or "wheel" or 4 more
"source"
"dist"
"wheel"
"openapi-with-transforms"
"openapi-with-code-samples"
"openapi-sdk-spec"
"file"
url: string

URL for direct download

path: optional string

The path of the file, which is only present when using with the type “file” option.

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: "node" or "typescript" or "python" or 10 more
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
"sql"
"openapi"
type: "source" or "dist" or "wheel" or 4 more
"source"
"dist"
"wheel"
"openapi-with-transforms"
"openapi-with-code-samples"
"openapi-sdk-spec"
"file"
url: string

URL to git remote

content: object { content, output, target, 2 more }
content: string

The raw content of the output

output: "content"
target: "node" or "typescript" or "python" or 10 more
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
"sql"
"openapi"
type: "source" or "dist" or "wheel" or 4 more
"source"
"dist"
"wheel"
"openapi-with-transforms"
"openapi-with-code-samples"
"openapi-sdk-spec"
"file"
path: optional string

The path of the file, which is only present when using with the type “file” option.

Download build target output

stl builds:target-outputs retrieve \
  --api-key 'My API Key' \
  --build-id build_id \
  --target node \
  --type source
{
  "output": "url",
  "target": "node",
  "type": "source",
  "url": "url",
  "path": "path"
}
Returns Examples
{
  "output": "url",
  "target": "node",
  "type": "source",
  "url": "url",
  "path": "path"
}