Skip to main content

Cookie control banner

Necessary Cookies
These cookies are necessary for this website to function correctly. They are set when you perform certain actions on the site, such as creating an account, logging in, changing your privacy preferences or submitting a form. You can block these cookies in your browser, but this will stop parts of the site from working properly.
Functional Cookies
These cookies allow the website to provide extra functionality and more personalised experiences. They may be set by us or by third party providers whose services we have added to our pages. If you choose not to allow these cookies, these services may not work correctly.
Analytical Cookies
These cookies record anonymous data on how visitors use our website to help us monitor how well our website works. This data includes how many people have looked at specific pages, how long visitors stay on the site, and what devices they use. We use this data to identify changes that we could make to improve your experience and make our website more efficient.
Marketing Cookies
We set some cookies so you are shown more relevant marketing content. These include cookies from third-party advertising networks to show you different adverts on their services if you have previously visited our site. If you choose not to allow these cookies, you may experience less relevant advertising on other sites.
Browse Documentation

Managing assets

Created by r.turner, last modified by r.bromley on 30 Apr 2021

Create an asset

Before an asset can be created, an asset file needs to be uploaded. This will return a temporary fileId value which can be used as a file reference when creating the entry that represents the asset.

The AssetFile type needs to used in a field called "sysAssetFile" and the dataFormat within the sys object needs to be specified as "asset".

Example request

The JSON below is example of an entry that represents an asset. This can be used to create an asset in the same way as creating an entry as assets are entries with additional properties.

{ "title": "Batman Returns", "sysAssetFile": { "fileId": "25bd73bb-cbb0-454f-a762-2bee08a68cbe.jpg", "parentNodePath": "/uploads/movie-posters" }, "sys": { "projectId": "movieDb", "dataFormat": "asset" } }

Updating an asset

Asset fields (i.e. title, description) can be updated just like an entry, but updating the file that an asset represents requires a new file to be uploaded as an asset file beforehand and then a new file reference be set.

Example request

In the example below a new "fileId" has been specified in the "sysAssetFile" field. When the entry is updated then the file that the entry represents is updated.

{ "title": "Batman Returns", "Description": "Batman Returns release poster", "sysAssetFile": { "fileId": "97d70ad2-017f-46ff-8d9e-f8d054652d9c.jpg" }, "sys": { "id": "0484bd0b-86d3-4d26-ac97-67514add802b", "contentTypeId": "image", "projectId": "movieDb", "dataFormat": "asset", "language": "en-GB", "version": { "versionNo": "1.0" } } }