Skip to content
  • Auto
  • Light
  • Dark

Retrieve

Download the output of a build target
builds.target_outputs.retrieve(TargetOutputRetrieveParams**kwargs) -> TargetOutputRetrieveResponse
get/v0/build_target_outputs

Download the output of a build target

Parameters
build_idstr

Build ID

targetliteral
Literal["node", "typescript", "python", 8 more]

SDK language target name

Hide ParametersShow Parameters
"node"
"typescript"
"python"
"go"
"java"
"kotlin"
"ruby"
"terraform"
"cli"
"php"
"csharp"
typeliteral
Literal["source", "dist", "wheel"]
Hide ParametersShow Parameters
"source"
"dist"
"wheel"
outputliteral
optional
Literal["url", "git"]

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

Hide ParametersShow Parameters
"url"
"git"
Returns
TargetOutputRetrieveResponsetype
Hide ParametersShow Parameters
UnionMember0class
Hide ParametersShow Parameters
outputliteral
Literal["url"]
Hide ParametersShow Parameters
"url"
targetTarget
typeliteral
Literal["source", "dist", "wheel"]
Hide ParametersShow Parameters
"source"
"dist"
"wheel"
urlstr

URL for direct download

UnionMember1class
Hide ParametersShow Parameters
tokenstr

Temporary GitHub access token

outputliteral
Literal["git"]
Hide ParametersShow Parameters
"git"
refstr

Git reference (commit SHA, branch, or tag)

targetTarget
typeliteral
Literal["source", "dist", "wheel"]
Hide ParametersShow Parameters
"source"
"dist"
"wheel"
urlstr

URL to git remote

from stainless_v0 import Stainless

client = Stainless(
    api_key="My API Key",
)
target_output = client.builds.target_outputs.retrieve(
    build_id="build_id",
    target="node",
    type="source",
)
print(target_output)
200 Example
{
  "output": "url",
  "target": "node",
  "type": "source",
  "url": "url"
}