Expand my Community achievements bar.

SOLVED

Unable to get the complete metadata of asset using HTTP API

Avatar

Level 2

I am using the Assets HTTP API. One of the limitations is "Asset API does not return the complete metadata. In API the namespaces are hardcoded and those only get returned. If you need whole metadata, then look at the asset path /jcr_content/metadata.json."

 

I am accessing the following path but it still does not show the complete metadata

<URL>/api/assets/image.png.json/jcr_content/metadata.json

 

Am I accessing an invalid endpoint?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

Welcome to AEM Community !!
Are you able to access the asset's json, when you try <URL>/api/assets/image.png.json?

If yes, please try adding /jcr:content/metadata.json on that URL.

 

Note : I was trying to access the metadata on my local AEM Author instance and this works http://localhost:<portnumber>/content/dam/folder/assetname/jcr:content/metadata.json

Thanks,

Vikram Gaur

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Hi,

Welcome to AEM Community !!
Are you able to access the asset's json, when you try <URL>/api/assets/image.png.json?

If yes, please try adding /jcr:content/metadata.json on that URL.

 

Note : I was trying to access the metadata on my local AEM Author instance and this works http://localhost:<portnumber>/content/dam/folder/assetname/jcr:content/metadata.json

Thanks,

Vikram Gaur

Avatar

Level 2

Hello @Vikram_Gaur_  & @uafzal,

 

Adding /jcr:content/metadata.json to assets http api url <host:port>/api/assets/asset/jcr:content/metadata.json returns 404. The example given http://localhost:portnbr/content/dam/folder/assetname/jcr:content/metadata.json is not an asset http api request, it's a sling api i think. Note the beginning of the url, /api/assets vs /content/dam.

 

Thanks,

SKM

Avatar

Level 2

Hi SKM, Have you found the solution for this?