(Sorry for the delay in replyingā¦)
As I mentioned, weāve had this scenario come up multiple times in another application where weāre using a different CMS vendor which allows us to directly control the path and URL of assets. In other words, we donāt have to attach an asset to a content item and use a content request to retrieve the assetās URL.
Hereās the typical scenario: Thereās another system, e.g. a CRM or inventory system, whose content and structure we donāt control. So we canāt add asset URLs to the items in that system. Each item has a unique ID. Weāre developing an application which allows users to interact with those items: view, page, filter, etc. Say the users are viewing 50 items at a time out of 2,500 total items.
Because of the sorting, filtering, and paging capabilities, the set of unique item IDs displayed at any time are not contiguous nor are they predictable.
In the application weāre developing, we want to associate an asset with each item - an image, a pdf file, whatever.
If we can directly control the URL of these assets in the CMS, then we can know that each itemās asset URL is of the form: https://{tenant-domain-name/assets/crm-items/{unique-item-id}.png. Our application can simply construct URLs of that form just by knowing each item ID.
As things stand with DatoCMS now, weād first have to define a content model to represent each item. Then weād have to create 2,500 content items of that model. That in itself is a significant amount of overhead. But then, worse than that, at runtime of our application, weād have to construct a query thatās essentially: āWHERE unique-item-id IN (list,of,50,item,ids)ā, process each content item returned in the response to that query, and then pull the asset URL out of each.
Hopefully that makes sense. As I said, weāve followed the above pattern of āconstruct the asset URL b/c we know the convention of the asset URL formatā in several features of another application.
I really appreciate you asking me the follow-up question.
Donnie Hale