NylorunDocsBeta
Runtime APIArtifacts

Download a version of an artifact

GET
/v1/artifacts/{artifactId}/versions/{version}/content

Streams the bytes through the Runtime. One Range: bytes=… gives 206 with Content-Range; several ranges give the whole file. A folder is a 400: read its tree, its files or its zip.

Authorization

headerAuthorizationBearer <token>

An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).

Path Parameters

artifactId*string
version*string

A version number, or latest

Header Parameters

Nylorun-Protocol*string

The protocol version, 8

Nylorun-Subject?string

The person an application key acts for

Nylorun-Scopes?string

The subject's space-separated scopes; required with a subject

Response Body

The file

response?file*/*
Formatbinary
import { createClient } from "@nylorun/agents";const client = await createClient();const response = await client.artifacts.download("art_123", { version: 2 });
"string"