Expandir minha barra de realizações na Comunidade.

SOLUCIONADO

Getting 500 error on ASSET QueryBuilder Query

Avatar

Level 8

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.

Tópicos

Os tópicos ajudam a categorizar o conteúdo da comunidade e aumentam sua capacidade de descobrir conteúdo relevante.

1 Solução aceita

Avatar

Resposta correta de
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 

Ver solução na publicação original

5 Respostas

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 8

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

Level 8

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

Avatar

Resposta correta de
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