Expand my Community achievements bar.

SOLVED

Query AEM data using a web service call?

Avatar

Level 5

We are storing some information in AEM which we want to "read" and display in our internal systems. Can we query AEM via endpoints that are exposed or we just use a .json OOB selector for the nodes.

 

What is an ideal way to read data in AEM from an external system

1 Accepted Solution

Avatar

Correct answer by
Level 10

AEM supports REST. Write a custom sling servlet that uses QueryBuilder API or JCR SQL to produce a result set. Then have your external system perform a GET request to get JCR data.  The servlet will be on pub instance as well.

View solution in original post

6 Replies

Avatar

Level 5

But typically the 4502 port is not open for outside world. Our AEM instance in EC2 cloud and we are quering from outside. I am guessing we are only allowed access through dispatcher.

 

Is that the only way?

Avatar

Correct answer by
Level 10

AEM supports REST. Write a custom sling servlet that uses QueryBuilder API or JCR SQL to produce a result set. Then have your external system perform a GET request to get JCR data.  The servlet will be on pub instance as well.

Avatar

Level 10

If you are using it internally, we can go with Query but however if it has to be consumed by an external system its better to expose it as a json via a service

Avatar

Employee Advisor

The default .json rendition is a good starting point. Everything on top depends pretty much on the requirements you have.

kind regards,
Jörg