Artifacts ยท version 0.1.0
Download a run artifact
GET
/api/artifacts/downloadStreams a generated SDK bundle, docs, report file, or authenticated source input file for a run. Pass the run id plus an artifact key from `run.artifactManifest.artifacts[]`. Source input artifacts such as `input.openapi` and `input.config` require the same workspace membership and artifact entitlement as generated artifacts.
Request
curl -X GET 'https://sourced.sh/api/artifacts/download' \
-H 'Authorization: Bearer $SOURCED_API_KEY'
const response = await fetch("https://sourced.sh/api/artifacts/download", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.SOURCED_API_KEY}`,
},
});
const data = await response.json();
import os
import requests
response = requests.request(
"GET",
"https://sourced.sh/api/artifacts/download",
headers={"Authorization": f"Bearer {os.environ['SOURCED_API_KEY']}"},
)
data = response.json()
Parameters
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
runId | string | Yes | Run id that owns the artifact. |
key | string | Yes | Artifact storage key from `run.artifactManifest.artifacts[]`. Generated artifacts and authenticated source input artifacts are downloadable by workspace members with artifact access. |
Responses
200
Artifact contents.
application/octet-stream
type: string
400
401
402
403
404
410
The artifact has expired.
application/json
Error:
type: object
required: error
properties:
error (required): string
Stable machine-readable error code.
message: string
Optional human-readable description.