Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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