Get an asset with every rendition
const url = 'https://api.ebitex.io/assets/delivery/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';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://api.ebitex.io/assets/delivery/v1/assets/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'Returns one asset with all of its renditions, and takes no locale. file is an object with a default rendition and a locales map of per-locale overrides, so one response serves every locale; alt and caption have the same shape. Delivered custom fields appear as members of the same object, named by their keys (for example photographer); a field the asset has no value for is left out, and fields marked internal in Assets are never returned.
Pick a locale yourself by looking locales up along your own fallback order and using default when none matches, or use GET /assets/{id}/rendition to have the API do it.
file.url is a public link for a public asset. For a private asset on a channel that allows them it is a signed link that stops working after one hour, so use it promptly and do not store it.
An asset can be restricted to an audience. Send the visitor’s audience token in the X-Ebitex-Audiences header (the content SDK does this for you). Without a token that grants the audience the asset has no link at all: this read answers 403 with members_only and the asset’s kind, and nothing else about it. With one, the asset is returned with links that last five minutes and an expiresAt that says when they stop. A list shows a restricted asset the token does not grant as a stub: its name, its type, and "restricted": true, with no file and no thumbnail.
A channel decides what a key sees: its folders, its categories, and whether private assets are included. An asset outside the channel answers 404, exactly as one that does not exist, so a key can never read by id what it cannot list. Responses are never cached: links to private assets are minted for each response.
Key: an Assets channel key (assets.delivery.read), minted for one channel in Assets. What it can see is that channel’s.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Responses
Section titled “ Responses ”OK
unknown_parameter: this read takes no locale; use GET /assets/{id}/rendition for one locale.
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired, or its channel no longer exists.
payment_required: the organization’s subscription needs attention.
members_only: the asset is restricted to an audience the visitor’s token does not grant. The body names the asset’s kind and nothing else.
scope_denied: the key lacks assets.delivery.read. app_not_available: Assets is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.
not_found: there is no such asset, or it is outside the key’s channel.
too_many_failed_authentications: too many bad keys from this address; Retry-After says how long to wait.