Getting 500 error on ASSET QueryBuilder Query | Community
Skip to main content
October 15, 2024
Solved

Getting 500 error on ASSET QueryBuilder Query

  • October 15, 2024
  • 1 reply
  • 956 views

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.

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 MukeshYadav_

Thanks @mukeshyadav_ Can you please let me know the how to narrow down the path.


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 

1 reply

MukeshYadav_
Community Advisor
Community Advisor
October 15, 2024

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

October 15, 2024

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 

MukeshYadav_
Community Advisor
Community Advisor
October 15, 2024

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