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

Query API Return results in JSON

Avatar

Level 1

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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-quer...

 

 

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

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-quer...