This section describes the DAM API that allows you to create a friendly URL for an
asset.
Important:
To set friendly URLs, assets must always have a unique name in a collection.
You cannot upload an asset with a file name that already exists in a
collection; doing so returns an error message that says you must update the
file name and try uploading again.
For existing assets that have duplicate names in a collection, you must
rename these assets so you can set friendly URLs.
You can provide a unique name whenever you save the asset as new.
What is a friendly URL?
A friendly URL makes a web address easy-to-read by using words to describe the
content, making it easier to remember. With the DAM API, you can set a friendly
URL.
In contrast, a binaryUrl you get from Copy
link on the Edit page, consists of a string
of characters representing the collection_id,
item_id, and rendition_id.
Meanwhile, a customUrl provides the original rendition of an asset.
The customUrl is not related to a friendly URL.Figure 2. Custom URL field from the Edit page
Sample
customUrl:
https://sample-url.com/dx/api/dam/custom/car
Using the DAM API explorer, you can set a friendly URL for each asset, individually.
You can get the content of an asset by choosing a specific property such as:
The item_id, file name, or custom URL of an asset.
The rendition_id or the rendition type.
The version number for each version of a rendition.
Here is a DAM API URL with an item ID, rendition ID, and version
ID:
If an asset happens to have the same name with another asset in a collection, a
notification is displayed in the Information panel.Figure 3. Notification to rename an asset
You can click Rename from the notification and provide a
unique name.Figure 4. Rename asset dialog