Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Check if artifact exists

Check that a cache artifact with the given hash exists. This request returns response headers only and is equivalent to a GET request to this endpoint where the response contains no body.

Implementers should return 200 if the artifact exists, or 404 if it does not.

HEAD/artifacts/{hash}
Authorization
AuthorizationBearer token · headerrequired

Bearer token authentication. Pass your authentication token in the Authorization header as Bearer <token>.

For self-hosted implementations, the token format and validation logic is up to the implementer. Common approaches include:

  • Static tokens for simple setups
  • JWT tokens for stateless authentication
  • OAuth2 tokens for integration with identity providers
Path parameters
hashstringrequired

The artifact hash. This is a content-addressable hash that uniquely identifies the cached artifact based on task inputs.

min length 1 · matches ^[a-fA-F0-9]+$
Query parameters
teamIdstring

The team identifier to perform the request on behalf of. Used for multi-tenant cache implementations where artifacts are scoped to teams.

slugstring

The team slug to perform the request on behalf of. Alternative to teamId for identifying the team.

Responses
200

Artifact exists

400

Bad request. One or more of the provided values in the request query, headers, or body is invalid.

codestringrequired

A machine-readable error code

messagestringrequired

A human-readable error message

401

Unauthorized. The request is missing a valid authentication token or the token is invalid.

codestringrequired

A machine-readable error code

messagestringrequired

A human-readable error message

403

Forbidden. The authenticated user does not have permission to access this resource.

codestringrequired

A machine-readable error code

messagestringrequired

A human-readable error message

404

Artifact not found. No artifact with the specified hash exists.

codestringrequired

A machine-readable error code

messagestringrequired

A human-readable error message

Try it
Server
Authorization
Parameters
Request
curl --head 'https://turborepo-remote-cache.example.workers.dev/v8/artifacts/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
Artifact exists

Was this page helpful?