How to connect AEM with Rest Api | Community
Skip to main content
October 16, 2015
Solved

How to connect AEM with Rest Api

  • October 16, 2015
  • 7 replies
  • 13453 views

Are there any steps to connect to AEM using Rest Api, if any body has come across this situation then please repond back with set of steps or any help.

Thanks

Santosh

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 pankajc18586445

Hey, thanks for the reply. I came to know that I was getting java.net.UnknowHostException due to the restriction policy at my company. It worked fine when I connected wifi to my mobile network. :)

7 replies

smacdonald2008
Level 10
October 16, 2015

You can create your own AEM service using an OSGi bundle that contains Java API that invokes Restful services. See this community article:

http://helpx.adobe.com/experience-manager/using/restful-services.html

As an example -- it uses a Google Restful web service.

TusharCapoor
October 16, 2015

Hi Santosh,

If i am not wrong you are asking about calling a REST service from CQ5. Please find the below code line which tells to call REST service from JSP using AJAX call.

$.ajax({
         type: "POST",
         contentType: "application/json",
         dataType: 'json',
         url: 'REST Service URL', -- Need to be changed
         data: JsonJSquery, -- Need to be changed
         async: true,
         success: function(data){
           //Code to be written
           }      
         });

Thanks.

February 17, 2017

Hi,

I tried the same, but getting null in response. Any idea what's the problem?

 

Thanks

Prince_Shivhare
Community Advisor
Community Advisor
February 17, 2017

Hi,

Scott has provided you Helpx article you can follow that.

Additionally you can also check "https://helpx.adobe.com/experience-manager/using/restful_htl.html".

I have recently successfully worked with it. Also it is tested by Certified developer Ratan Kumar. let us know if you will face any issue.

~ Prince Shivhare

pankajc18586445Accepted solution
February 20, 2017

Hey, thanks for the reply. I came to know that I was getting java.net.UnknowHostException due to the restriction policy at my company. It worked fine when I connected wifi to my mobile network. :)

Level 2
August 7, 2017

Will this work with AEM 6.3? There are sample downloads available specific to 6.1 and 6.2, but not 6.3 and the Article Summary Version row states

VersionAdobe Experience Manager 6.1/ 6.2
Level 2
August 7, 2017

When I downloaded and installed the 6.2 package and tried it out, I got a SightlyException error after submitting the two cities input:
"Cannot find a file corresponding to class com.community.rest.core.HeroRestComponent in the repository."