Skip to main content
New Participant
October 30, 2018

Customize DAM Assets HTTP API response

  • October 30, 2018
  • 5 replies
  • 5709 views

One of our application user is calling the OOTB Asset HTTP API to get assets but we are noticing that it does not pull all the properties of an asset. Like if we want to see cq:lastReplicationAction for an asset under the jcr:content content node, but it is not included in the response. It includes only self and content nodes with the asset url and with only 3-4 meta data properties like dc:modified, dc:title and dc:description. Whereas asset has lot more metadata and those are not included.

  I am wondering if there is a way to customize this API call to add our logic for fetching assets?

Assets HTTP API we are refering to - Assets HTTP API

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

smacdonald2008
New Participant
October 31, 2018

If you need to work with Assets with code - why not use the Strongly typed Asset Manager API: com.day.cq.dam.api.AssetManager 

vsharmAuthor
New Participant
October 31, 2018

Yes, we could use Asset Manager API and have used it in our project. However that would require us to the development work which we are trying to avoid. The caller application also would require to make the code changes at their side unless we develop the API and generate the response similar to HTTP API (which means more work for us) so that they have to do minimal work.

The whole idea for using Asset HTTP API was so that we don't have to do extra coding and can simply rely on OOTB functionality which has been working for us from long time until this requirement came in where we need to have more data in the API response.

If there could have been customization for Asset HTTP API response (include more meta data fields etc) then it would have been preferable. Is it not possible?

We did create an Adobe daycare ticket for it but they came back saying that this is how OOTB functionality is and they suggested to check in this forum.

smacdonald2008
New Participant
November 1, 2018

I find that the Strongly typed API works better to programmatically work with assets. If you want HTTP interaction - look at writing Sling Servlets that use Asset Manager API.

For example - if you use AssetManager API to upload an Asset to the AEM DAM - you will get same renditions as you would if you uploaded using the AEM Admin UI.