NylorunDocsBeta
Runtime APIArtifacts

Download one file of a folder version

GET
/v1/artifacts/{artifactId}/versions/{version}/files/{path}

Streams the file at path (its path in the folder, with / percent-encoded as %2F) through the Runtime, with Range as for a file artifact.

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

path*string

The file's path in the folder, percent-encoded

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.file("art_123", "src/index.ts", {  version: 2,});
"string"