Predefined settings
Note
The concept of predefined settings have been replaced by transformation functions in DAM 24.
If you haven't already, read Creating a predefined setting on how to get started creating predefined settings.
Retrieving the transformed file via the UI
You can download a transformed file based on the predefined setting. To transform a file using the predefined setting do the following:
- Click on the file to see the file details, which also show the unique identifier (File ID) for the file.
- Go to the 'Transformations' tab.
- Select the predefined setting 'Canvas 400x400' and click 'Download'.
Retrieving the transformed file via the API
Instead of using the UI for getting files with a certain transformation, using the API is more appropriate for a webshop integration. Let's use the API to retrieve a URL for the same image as before:
- Go to
https://localhost:8012/swagger/index.html
or where you might access the DAM API. - Authorize
- Go to
GET: /api/_/predefined-settings/by-name
and send a request with the name ofCanvas 400x400
and copy the id of the response. -
Go to
POST: /api/{culture}/files/cache/details
and send a request with the following body:Note
Your
fileId
andpredefinedSettingId
will be different from the ones in the request above.Important
If the predefined setting is not caching automatically or a request with a custom transformation is sent, the API will build the file during the request. This can lead to slow response times.
You should get a
fileUri
which can be used to retrieve the file, alongside some meta information for the transformed file.Important
Do not cache the
fileUri
for a long period since it can change.