Download Artifacts from CAS
Downloads artifacts stored in the Chainloop Content Addressable Storage (CAS).
The artifact is identified by its cryptographic digest, which serves as both the unique identifier and integrity verification mechanism. The endpoint behavior varies based on the client type detected via the Accept header.
Client-Specific Behavior:
- Browser clients (Accept contains “text/html”): Receives a user-friendly message with a 1-second delayed redirect using the Refresh header
- CLI/API clients (other Accept values): Receives immediate 302 redirect via Location header
Authorizations
Bearer token for authentication
Headers
Content type preferences. Affects redirect behavior:
- Contains "text/html": Browser-friendly redirect with delay and message
- Other values: Direct 302 redirect (suitable for CLI tools like curl)
"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
Path Parameters
The full cryptographic digest of the artifact including algorithm prefix. Currently supports SHA-256 hashes only.
71
Response
Successful redirect to artifact download URL. Response behavior depends on the Accept header:
For browsers (Accept contains "text/html"):
- Uses
Refresh
header with 1-second delay - Returns user-friendly message in response body
- Provides better UX for browser downloads
For CLI tools (other Accept values):
- Uses standard
Location
header for immediate redirect - Empty response body
- Suitable for automated tools like curl
The response is of type string
.
"Your download will begin shortly..."