Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

JSON file for /content/DAM path

Avatar

Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

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

View solution in original post

3 Replies

Avatar

Community Advisor

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 @Bimmi_Soi  mentioned.

 

Thanks

Dipti Chauhan

 

Avatar

Correct answer by
Community Advisor

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

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