v14

latestOpenAPI 3.0.32026-08-04377889.4 MB
artifacts

Record an artifacts cache usage event

Records an artifacts cache usage event. The body of this request is an array of cache usage events. The supported event types are HIT and MISS. The source is either LOCAL the cache event was on the users filesystem cache or REMOTE if the cache event is for a remote cache. When the event is a HIT the request also accepts a number duration which is the time taken to generate the artifact in the cache.

post/v8/artifacts/events

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Headers

'x-Artifact-Client-Ci'string

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

Example:VERCEL

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

'x-Artifact-Client-Interactive'integer

1 if the client is an interactive shell. Otherwise 0

1 if the client is an interactive shell. Otherwise 0

Request body

sessionIdstring required

A UUID (universally unique identifer) for the session that generated this event.

source'LOCAL' | 'REMOTE' required

One of LOCAL or REMOTE. LOCAL specifies that the cache event was from the user's filesystem cache. REMOTE specifies that the cache event is from a remote cache.

event'HIT' | 'MISS' required

One of HIT or MISS. HIT specifies that a cached artifact for hash was found in the cache. MISS specifies that a cached artifact with hash was not found.

hashstring required

The artifact hash

durationnumber

The time taken to generate the artifact. This should be sent as a body parameter on HIT events.

Example request

[
  {
    "hash": "12HKQaOmR5t5Uy6vdcQsNIiZgHGB",
    "duration": 400
  }
]

Response

Success. Event recorded.