POST
/
v8
/
artifacts
/
events
import { Vercel } from "@vercel/sdk";

const vercel = new Vercel({
  bearerToken: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  await vercel.artifacts.recordEvents({
    xArtifactClientCi: "VERCEL",
    xArtifactClientInteractive: 0,
    teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",
    slug: "my-team-url-slug",
    requestBody: [
      {
        sessionId: "<id>",
        source: "LOCAL",
        event: "HIT",
        hash: "12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
        duration: 400,
      },
    ],
  });


}

run();
This response does not have an example.

Authorizations

Authorization
string
header
required

Default authentication mechanism

Headers

x-artifact-client-ci
string

The continuous integration or delivery environment where this artifact is downloaded.

Maximum length: 50
Example:

"VERCEL"

x-artifact-client-interactive
integer

1 if the client is an interactive shell. Otherwise 0

Required range: 0 <= x <= 1
Example:

0

Query Parameters

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Body

application/json · object[]

The body is of type object[].

Response

200

Success. Event recorded.