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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

JSON file for /content/DAM path

geverett
Level 1
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
Arun_Patidar
Correct answer by
Community Advisor
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.

 

 

 

View solution in original post

0 Replies
Dipti_Chauhan
Community Advisor
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

 

Arun_Patidar
Correct answer by
Community Advisor
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.

 

 

 

View solution in original post