I have added metadata to a folder on DAM by using a custom folder metadata schema. However, I am unable to retrieve the information back using the assets API. Doesn't work even with /jcr_content/metadata in the API path. Is it possible to retrieve it using Assets API at all? and how?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Correct, the Assets API won't return custom metadata. If you are using AEMaaCS, I would recommend exploring the new sets of API for Assets, which it seems could work for your use case: https://developer.adobe.com/experience-cloud/experience-manager-apis/api/experimental/assets/author/ .
If you are using AEM on-premise, you could simply rely on the HTTP API, something like this would work:
Asset Path: http://localhost:4502/assetdetails.html/content/dam/wknd-shared/en/adventures/cycling-tuscany/adobes...
Metadata access: http://localhost:4502/content/dam/wknd-shared/en/adventures/cycling-tuscany/adobestock-59459597.jpeg...
Hope this helps
Hi,
Correct, the Assets API won't return custom metadata. If you are using AEMaaCS, I would recommend exploring the new sets of API for Assets, which it seems could work for your use case: https://developer.adobe.com/experience-cloud/experience-manager-apis/api/experimental/assets/author/ .
If you are using AEM on-premise, you could simply rely on the HTTP API, something like this would work:
Asset Path: http://localhost:4502/assetdetails.html/content/dam/wknd-shared/en/adventures/cycling-tuscany/adobes...
Metadata access: http://localhost:4502/content/dam/wknd-shared/en/adventures/cycling-tuscany/adobestock-59459597.jpeg...
Hope this helps
Thank you @EstebanBustamante. I was hoping that I could still access the metadata using the Assets HTTP API somehow, but no worries.
Is this something that Adobe can consider adding to the Assets API? It would make sense for the Assets API to return folder metadata as well, as the API client can then determine how to process the assets under the folder according to the data on the folder metadata.
As far as I heard, they are not putting more effort into the Asset API but the preferred one would be these: https://developer.adobe.com/experience-cloud/experience-manager-apis/api/experimental/assets/author/. So hopefully you can stick to that.
Hope this helps
Hi @Balaram_Rudra ,
To be more precise just you need to append a selector e.g. 1 to your metadata which you were trying. It will work.
We can hit http://localhost:6502/content/dam/Seek_AEM_4-1721395328887.png/jcr:content/metadata.1.json
or
We can get via servlet/model https://www.linkedin.com/pulse/get-asset-meta-data-from-node-aem-keshav-chaurasiya
Thanks
Thank you @MukeshYadav_ , however, I was looking more towards the Assets HTTP API for this as my solution is relying already on it for the rest of the assets data.
Hi @Balaram_Rudra ,
As mentioned in limitation https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/admin/mac...
However not sure about your use case, but work around can be if we move those custom properties to asset level instead of folder level.
We are able to fetch asset level metadata via asset api
OR if you add custom property at jcr:content of folder itslef then it is accessible via assetapi
Thank
Thank you for the suggestions @MukeshYadav_ , I will definitely consider them. Much appreciated
Views
Replies
Total Likes
@Balaram_Rudra Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Likes
Replies
Views
Likes
Replies