Returns a Digital Asset
JavaScript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}}; fetch('http://{defaultHost}/api/v2/platform/digitals/{id}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "data": { "id": "28", "type": "digital", "attributes": { "url": "/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBMUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--0b80fde2e739c30ef5390b1ca35d677810a2d02c/thinking-cat.jpg", "content_type": "image/jpeg", "filename": "thinking-cat.jpg", "byte_size": 18090 }, "relationships": { "variant": { "data": { "id": "112", "type": "variant" } } } } }
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Select which associated resources you would like to fetch, see: https://jsonapi.org/format/#fetching-includes
Record found
Show child attributes
Was this page helpful?