## Retrieve `builds.target_outputs.retrieve(**kwargs) -> TargetOutputRetrieveResponse` **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 - `build_id: String` Build ID - `target: :node | :typescript | :python | 10 more` SDK language target name - `:node` - `:typescript` - `:python` - `:go` - `:java` - `:kotlin` - `:ruby` - `:terraform` - `:cli` - `:php` - `:csharp` - `:sql` - `:openapi` - `type: :source | :dist | :wheel | 3 more` - `:source` - `:dist` - `:wheel` - `:"openapi-with-transforms"` - `:"openapi-with-code-samples"` - `:"openapi-sdk-spec"` - `output: :url | :git` Output format: url (download URL) or git (temporary access token). - `:url` - `:git` ### Returns - `TargetOutputRetrieveResponse = { output, target, type, url} | { token, output, ref, 3 more}` - `class URL` - `output: :url` - `:url` - `target: Target` - `:node` - `:typescript` - `:python` - `:go` - `:java` - `:kotlin` - `:ruby` - `:terraform` - `:cli` - `:php` - `:csharp` - `:sql` - `:openapi` - `type: :source | :dist | :wheel | 3 more` - `:source` - `:dist` - `:wheel` - `:"openapi-with-transforms"` - `:"openapi-with-code-samples"` - `:"openapi-sdk-spec"` - `url: String` URL for direct download - `class Git` - `token: String` Temporary GitHub access token - `output: :git` - `:git` - `ref: String` Git reference (commit SHA, branch, or tag) - `target: Target` - `:node` - `:typescript` - `:python` - `:go` - `:java` - `:kotlin` - `:ruby` - `:terraform` - `:cli` - `:php` - `:csharp` - `:sql` - `:openapi` - `type: :source | :dist | :wheel | 3 more` - `:source` - `:dist` - `:wheel` - `:"openapi-with-transforms"` - `:"openapi-with-code-samples"` - `:"openapi-sdk-spec"` - `url: String` URL to git remote ### Example ```ruby require "stainless_v0" stainless = StainlessV0::Client.new( api_key: "My API Key", environment: "staging" # defaults to "production" ) target_output = stainless.builds.target_outputs.retrieve(build_id: "build_id", target: :node, type: :source) puts(target_output) ```