Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Getting 500 error on ASSET QueryBuilder Query

Avatar

Level 7

When I am hitting this API Assets: curl --location '{aem_host_url}/bin/querybuilder.json?type=dam%3AAsset&path=%2F&path.self=false&p.limit=1000&p.offset=0' \ --header 'Authorization: Basic {basic_auth_credentials}' 


Getting 500 error code. 
What might be the issue.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Please find below

 

curl --location 'http://localhost:4502/bin/querybuilder.json?type=dam%3AAsset&path=%2Fcontent/dam/we-retail/en/people/mens&path.self=false&p.limit=1000&p.offset=0' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='

 

Here content/dam/we-retail/en/people/mens is path of folder instead of /(%2F) root path. You may mention yours sub folders path

 

  • type=dam%3AAsset: This specifies resources of type dam:Asset. The %3A is the URL-encoded version of :.
  • path=%2Fcontent/dam/we-retail/en/people/mens: This specifies the path to search for assets. The %2F is the URL-encoded version of /, indicating the starting point of the search within the DAM (Digital Asset Management).

However exact error may be found in error log file.

 

Thanks 

View solution in original post

5 Replies

Avatar

Community Advisor

Hi ,

Below format is working for me in local or you may try double quote as you are using variables

 

curl --location 'http://localhost:4502/bin/querybuilder.json?type=dam%3AAsset&path=%2F&path.self=false&p.limit=1000&p.offset=0' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='

 

 

Thanks

Avatar

Level 7

this is the sample curl is have pasted for context not the exact one. 
No issue with curl command. 
Since same query for page is working 

Avatar

Community Advisor

Hi,

Same curl cmd is working for me.

You may check logs for the exact error.

If you feels error is due to large number of asset, you may narrow down the path and try.

Thanks

Avatar

Correct answer by
Community Advisor

Hi,

Please find below

 

curl --location 'http://localhost:4502/bin/querybuilder.json?type=dam%3AAsset&path=%2Fcontent/dam/we-retail/en/people/mens&path.self=false&p.limit=1000&p.offset=0' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='

 

Here content/dam/we-retail/en/people/mens is path of folder instead of /(%2F) root path. You may mention yours sub folders path

 

  • type=dam%3AAsset: This specifies resources of type dam:Asset. The %3A is the URL-encoded version of :.
  • path=%2Fcontent/dam/we-retail/en/people/mens: This specifies the path to search for assets. The %2F is the URL-encoded version of /, indicating the starting point of the search within the DAM (Digital Asset Management).

However exact error may be found in error log file.

 

Thanks