Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Query artifact information

Query information about multiple artifacts by their hashes. Returns metadata about each artifact including size, task duration, and tag.

This endpoint is optional for basic cache functionality but enables optimized cache fetching by allowing the client to query multiple artifacts in a single request.

POST/artifacts
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
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.

Request body
requiredapplication/json
hashesstring[]required

Array of artifact hashes to query

Responses
200

Artifact information retrieved successfully

object
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

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://turborepo-remote-cache.example.workers.dev/v8/artifacts' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "hashes": [
    "string"
  ]
}'
Response
{
  "property1": {
    "size": 0,
    "taskDurationMs": 0,
    "tag": "string"
  },
  "property2": {
    "size": 0,
    "taskDurationMs": 0,
    "tag": "string"
  }
}

Was this page helpful?