Download a cache artifact
GET
https://api.vercel.com/v8/artifacts/{hash}Downloads a cache artifact indentified by its
hash specified on the request path. The artifact is downloaded as an octet-stream. The client should verify the content-length header and response body.Request
import { Vercel } from "@vercel/sdk";
const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>",});
async function run() { const result = await vercel.artifacts.downloadArtifact({ xArtifactClientCi: "VERCEL", xArtifactClientInteractive: 0, hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB", teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", });
console.log(result);}
run();Response
"string"AuthorizationbearerToken
Default authentication mechanism
200Success
400One of the provided values in the request query is invalid.
One of the provided values in the headers is invalid
401The request is not authorized.
402The account is missing a payment so payment method must be updated
403The customer has reached their spend cap limit and has been paused. An owner can disable the cap or raise the limit in settings.
The Remote Caching usage limit has been reached for this account for this billing cycle.
Remote Caching has been disabled for this team or user. An owner can enable it in the billing settings.
You do not have permission to access this resource.
404The artifact was not found
410Error