Get package-scoped asset by slug
GET
/api/assets/{configId}/_package/{packageName}/slug/{slug}/{rendition}
const url = 'https://example.com/api/assets/example/_package/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/_package/example/slug/example/example?format=webp&version=latestpublished&download=true' \ --header 'Authorization: Bearer <token>'Retrieves a package-scoped asset by its URL slug and rendition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”configId
required
string
packageName
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"}