JSON file for /content/DAM path | Community
Skip to main content
July 27, 2021
Solved

JSON file for /content/DAM path

  • July 27, 2021
  • 3 replies
  • 3378 views

Folks:

I was wondering if there is a default JSON created that lists all the assets in a path.  

For example: 

I created a folder structure:  https://mydomain/assets.html/content/dam/chec-press-releases/2020  and populated it with several assets.

If I go to > https://mydomain/libs/wcm/core/content/reference.json?path=%2Fcontent%2Fdam%2Fchec-press-releases%2f2020

I get a JSON file that only returns the first asset in the folder.  

Is there an "out of the box" JSON that lists all of the assets in that folder?

 

Thanks,

Glenn

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

Hi,

If you want to filter out the results, you can go with Querybulder API

http://localhost:4502/libs/cq/search/content/querydebug.html

 

type=dam:Asset path=/content/dam/chec-press-releases/2020 p.limit=-1 path.flat=true p.hits=selective p.properties = jcr:path

 

 

JSON QueryBuilder Link will be http://localhost:4502/bin/querybuilder.json?p.hits=selective&p.limit=-1&p.properties=jcr%3apath&path=%2fcontent%2fdam%2fchec-press-releases%2f2020&path.flat=true&type=dam%3aAsset

this link can you can get from the Query Builder Debugger page

 

Note:

remove path.flat=true from the query if want to look for subfolder assets as well.

 

 

 

3 replies

Adobe Employee
July 27, 2021

Hi @geverett ,

 

You can use the Assets HTTP API as follows:

https://helpx.adobe.com/ca/experience-manager/6-4/assets/using/mac-api-assets.html

 

Hope this helps!!
Thanks

Dipti_Chauhan
Community Advisor
Community Advisor
July 27, 2021

Hi @geverett 

  If you only want to view  assets on specific path,you can simply use infinity.json if you dont know the exact level, In your case you know exact level you can use .1.json

e.g https://mydomain/assets.html/content/dam/chec-press-releases/2020.1.json

 

Otherwise you can use Assets HTTP API  as @bimmiso  mentioned.

 

Thanks

Dipti Chauhan

 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
July 27, 2021

Hi,

If you want to filter out the results, you can go with Querybulder API

http://localhost:4502/libs/cq/search/content/querydebug.html

 

type=dam:Asset path=/content/dam/chec-press-releases/2020 p.limit=-1 path.flat=true p.hits=selective p.properties = jcr:path

 

 

JSON QueryBuilder Link will be http://localhost:4502/bin/querybuilder.json?p.hits=selective&p.limit=-1&p.properties=jcr%3apath&path=%2fcontent%2fdam%2fchec-press-releases%2f2020&path.flat=true&type=dam%3aAsset

this link can you can get from the Query Builder Debugger page

 

Note:

remove path.flat=true from the query if want to look for subfolder assets as well.

 

 

 

Arun Patidar