Query API Return results in JSON | Community
Skip to main content
New Participant
March 21, 2022
Solved

Query API Return results in JSON

  • March 21, 2022
  • 1 reply
  • 534 views

I can use the API to create a query, but can I also get the results from the query in the API?

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 DEBAL_DAS

you can write a servlet which can be exposed as an API.

In your servlet, you can get the same json object but return only ‘hits’ object as the response as suggested here 

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-get-readable-json-query-data-that-is-accessible-in-api/td-p/263482

 

 

 

 

1 reply

DEBAL_DAS
DEBAL_DASAccepted solution
New Participant
March 21, 2022

you can write a servlet which can be exposed as an API.

In your servlet, you can get the same json object but return only ‘hits’ object as the response as suggested here 

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-get-readable-json-query-data-that-is-accessible-in-api/td-p/263482