NylorunDocsBeta
Runtime APIArtifacts

Mint a capability link

POST
/v1/artifacts/{artifactId}/links

A short-lived path that downloads one version, with Range, with no other credential: for <img> tags, UIs and sharing. Signed by the Runtime with the Tenant's signing key; at most 15 minutes; it opens nothing once the artifact is deleted. A folder's link opens its zip, or with file that one file.

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

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

Request Body

application/json
  1. body
requestId?string
Length1 <= length
version?integer
Range0 < value
expiresIn?integer
Range1 <= value <= 900
file?string
Length1 <= length <= 1024

Response Body

The link

application/json
  1. response
path*string
artifactId*string
version*integer
Range0 < value
file?string
expiresAt*string
import { createClient } from "@nylorun/agents";const client = await createClient();const link = await client.artifacts.link("art_123", { expiresIn: 3600 });
{  "path": "string",  "artifactId": "string",  "version": 1,  "file": "string",  "expiresAt": "string"}