Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Customize DAM Assets HTTP API response

Avatar

Avatar
Validate 10
Level 3
vsharm
Level 3

Likes

9 likes

Total Posts

57 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 10
Level 3
vsharm
Level 3

Likes

9 likes

Total Posts

57 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back 10
View profile
vsharm
Level 3

30-10-2018

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

Replies

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

30-10-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 

Avatar

Avatar
Validate 10
Level 3
vsharm
Level 3

Likes

9 likes

Total Posts

57 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 10
Level 3
vsharm
Level 3

Likes

9 likes

Total Posts

57 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back 10
View profile
vsharm
Level 3

31-10-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.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

01-11-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.

Avatar

Avatar
Validate 10
Level 3
vsharm
Level 3

Likes

9 likes

Total Posts

57 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Validate 10
Level 3
vsharm
Level 3

Likes

9 likes

Total Posts

57 posts

Correct Reply

5 solutions
Top badges earned
Validate 10
Validate 1
Give Back 5
Give Back 3
Give Back 10
View profile
vsharm
Level 3

01-11-2018

Thanks. Yes, we have already provided the estimates for custom API using AssetManager API, but because the estimates were high we were exploring the option for customizing the OOTB DAM HTTP API call so that caller will have minimal work at their end.

I guess it is not possible with OOTB HTTP API but if you think otherwise then please let me know.

Avatar

Avatar
Level 1
sudharshank
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
sudharshank
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
sudharshank
Level 1

12-12-2018

Hi

We are trying to use OOTB http asset API as well, for exposing the assets for some external applications to consume and display asstes in their applications. The problem with this is, they were not able to see any meta data. We have created a read only user for them and they are doing an http call to get the asset details. When I try to do the HTTP call with admin ID, it works fine (renders metadata in the response). But the same is not happening with the read only users. Any suggestions will be helpful.

Note : Seeing the issue only in the publisher instances.

Thanks

Sudharshan