Get asset by slug
GET
/api/assets/{configId}/slug/{slug}/{rendition}
const url = 'https://example.com/api/assets/example/slug/example/example?format=webp&version=latestpublished&download=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/assets/example/slug/example/example?format=webp&version=latestpublished&download=true' \ --header 'Authorization: Bearer <token>'Retrieves an asset by its URL slug and rendition. Supports range requests for streaming media.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”configId
required
string
slug
required
string
rendition
required
string
Query Parameters
Section titled “Query Parameters”format
Output format for the asset (e.g., webp, jpg)
string
Example
webpversion
Version of the asset to retrieve (e.g., ‘latest’, ‘latestpublished’, or specific version number)
string
Example
latestpublisheddownload
If set, forces download with Content-Disposition header
string
Example
trueResponses
Section titled “Responses”Asset binary data
string format: binary
string format: binary
string format: binary
string format: binary
Partial content (for range requests)
Media typeapplication/octet-stream
string format: binary
Not Modified (ETag match)
Asset not found
Media typeapplication/json
object
error
required
Indicates an error occurred
boolean
message
required
Error message describing what went wrong
string
Example
{ "error": true, "message": "Item not found"}