POST /v8/artifacts/events

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.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

x-artifact-client-ci String No

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

x-artifact-client-interactive Integer No

1 if the client is an interactive shell. Otherwise 0

Query parameters

Name Type Required Description
teamId String No

The Team identifier to perform the request on behalf of.

slug String No

The Team slug to perform the request on behalf of.

Request body fields

Name Type Required Description
[] Array Yes
[].source String Yes

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.

Possible values:

  • "LOCAL"
  • "REMOTE"
[].hash String Yes

The artifact hash

[].event String Yes

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.

Possible values:

  • "MISS"
  • "HIT"
[].sessionId String Yes

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

[].duration Number No

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

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.