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

Unable to call rest API of publish via web server

Avatar

Level 2

Trying to call rest API of aem on publish via webserver. Not working in AEM 6.5

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Typically, publishers are not set up to be directly accessed by public users in a production environment. It's protected behind a dispatcher (web server). The dispatcher has some configuration which restricts public users from making such requests to paths and combinations of path and extensions; if your dispatcher does not allow you to access API's supported by AEM, then chances are, your requests are being blocked.

I say turn on the dispatcher logging (set as trace), and then reveal why you cannot call API's from the AEM publish instances. 

View solution in original post

8 Replies

Avatar

Level 4

Can you please provide few more details. Which API you are calling.

Avatar

Level 8

@manishaa5646486 Can you elaborate a bit more, on what exactly are you trying here?

Avatar

Correct answer by
Community Advisor

Typically, publishers are not set up to be directly accessed by public users in a production environment. It's protected behind a dispatcher (web server). The dispatcher has some configuration which restricts public users from making such requests to paths and combinations of path and extensions; if your dispatcher does not allow you to access API's supported by AEM, then chances are, your requests are being blocked.

I say turn on the dispatcher logging (set as trace), and then reveal why you cannot call API's from the AEM publish instances. 

Avatar

Level 2

We have developed ui were fetch data and store it through rest API. 

We are calling via domain assign to webserver where dispatcher is configured. We get 404 error as webserver is finding the rest API locally instead connecting with publisher.

Avatar

Level 2

We have developed a OSGI bundle and uploaded it on the publish instance as a jar file. In the OSGI bundle, a servlet is mapped to Servlet URL which is called from the domain via the web server.