Upload a cache artifact
Uploads a cache artifact identified by the hash specified on the path. The cache artifact can then be downloaded with the provided hash.
The request body should contain a gzip-compressed tarball of the task outputs. The server should store this data and make it available for subsequent downloads.
/artifacts/{hash}AuthorizationBearer token · headerrequiredBearer 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
hashstringrequiredThe artifact hash. This is a content-addressable hash that uniquely identifies the cached artifact based on task inputs.
teamIdstringThe team identifier to perform the request on behalf of. Used for multi-tenant cache implementations where artifacts are scoped to teams.
slugstringThe team slug to perform the request on behalf of. Alternative to teamId for identifying the team.
Content-LengthintegerrequiredThe artifact size in bytes
x-artifact-durationintegerThe time taken to generate the artifact in milliseconds. This value is stored and returned when the artifact is downloaded.
x-artifact-tagstringA base64-encoded tag for this artifact, typically used for verification. This value is stored and returned when the artifact is downloaded via the x-artifact-tag response header.
x-artifact-shastringThe git SHA of the HEAD commit at the time this artifact was produced. This value is stored and returned when the artifact is downloaded or checked via the x-artifact-sha response header.
x-artifact-dirty-hashstringA hash summarizing all uncommitted changes (staged, unstaged, and untracked files) in the working tree when this artifact was produced. This value is stored and returned when the artifact is downloaded or checked via the x-artifact-dirty-hash response header.
x-artifact-client-cistringThe continuous integration or delivery environment where this artifact operation is being performed. Examples: github-actions, circleci, jenkins.
x-artifact-client-interactiveintegerIndicates whether the client is running in an interactive shell. 1 for interactive, 0 for non-interactive (CI/scripts).
01application/octet-streamThe artifact data as a gzip-compressed tarball
anyArtifact uploaded successfully (alternative success response)
urlsstring<uri>[]requiredArray of URLs where the artifact was stored. Implementers can return the storage location(s) for debugging purposes.
Artifact accepted for storage
urlsstring<uri>[]requiredArray of URLs where the artifact was stored. Implementers can return the storage location(s) for debugging purposes.
Bad request. One or more of the provided values in the request query, headers, or body is invalid.
codestringrequiredA machine-readable error code
messagestringrequiredA human-readable error message
Unauthorized. The request is missing a valid authentication token or the token is invalid.
codestringrequiredA machine-readable error code
messagestringrequiredA human-readable error message
Forbidden. The authenticated user does not have permission to access this resource.
codestringrequiredA machine-readable error code
messagestringrequiredA human-readable error message