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

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list
SOLVED

AEMaaCS - Asset/Metadata list

Avatar

Level 3
Level 3

Hi, 

Our requirement is to get the list of all the available assets and metadata from /content/dam/wknddemo path. 

Currently, I use the below[1] query to get the list, but we are migrating to AEMaaCS, so I would like to know what are the options available to achieve the given requirement. 
 
 
Thanks

 

1 Accepted Solution

Avatar

Correct answer by
Level 5

Hi,

 

Please use below query in Query Debugger to fetch all the Assets :

 

path=/content/dam
type=dam:Asset
p.limit=-1

 

Query debugger Path : /libs/cq/search/content/querydebug.html

0 Replies

Avatar

Correct answer by
Level 5

Hi,

 

Please use below query in Query Debugger to fetch all the Assets :

 

path=/content/dam
type=dam:Asset
p.limit=-1

 

Query debugger Path : /libs/cq/search/content/querydebug.html

Avatar

Community Advisor

Use below query to get all assets and metadata from dam path. 

 

type=dam:Asset
path=/content/dam/<project>
p.hits=selective
p.properties=jcr:content/metadata/dc:format  jcr:content/metadata/dam:size

In above query i am fetching format and size. Click on JSON QueryBuilder Link to view metadata json

 

HeenaMadan_1-1663856807178.png

Json Response like this:

{"jcr:content":{"metadata":{"dam:size":649544,"dc:format":"image/jpeg"}}}

 

Avatar

Level 3
Level 3

@ksh_ingole7  @HeenaMadan thank you for your time and reply. 

 

I am running the query(given in the original post) successfully in AEM(On-prem) environment without any issues.  However, I wanted to make sure it was the right way to get an asset list from AEMaaCS or need to go with AssetHTTP API. 

 

@kautuk_sahni    Thank you in advance for any suggestions you may have.