Is there any out of box REST API component in AEM 6.1/6.2 ? My use case is need to invoke the REST API on page load and display the content on page, if there any AEM out of box component, just want to use that.
Solved! Go to Solution.
Views
Replies
Total Likes
"I am basically looking to consume third party REST API"
We have an end to end article on how to write a AEM Component that can invoke a 3rd party Restful endpoint:
1 - https://helpx.adobe.com/experience-manager/using/restful-services.html
2 - http://scottsdigitalcommunity.blogspot.ca/2016/09/creating-aem-html-template-language.html (displays the data in a HTL component). This has a video too on the AEM Commmunity YouTube Channel
Views
Replies
Total Likes
Hi Chandra,
By default aem is Restful & there is no specific end point. All request are resources. Sling resolution [0] is an key in understanding to access the info you are looking. [1] are the one I use a reference to understand initially. My experience for POST operations [3] helps a lot for manupulation.
Sling is resource centric & features in product is vast not able to cover all in doc. In general the basic AEM training covers the restful architect . The below article have complete example http://apachecon.com/presentation/materials/0000/0531/restful-sling-bdelacretaz-2010-101103132313-ph...
Below is simple example.
Create
curl -u admin:admin -Ftitle=hi http://localhost:4502/foo
GET in json format
curl -u admin:admin http://localhost:4502/foo.json
Update
curl -u admin:admin -Ftitle=hiupdate http://localhost:4502/foo
Delete
curl -u admin:admin -F:operation=delete http://localhost:4502/foo
[0]
https://kksays.files.wordpress.com/2016/07/sling-cheatsheet.png
[1]
http://www.slideshare.net/royfielding/rest-in-aem
https://docs.adobe.com/docs/v5_1/html-resources/cq5_guide_developer/ch02s08.html
http://www.slideshare.net/DEEPAKKHETAWAT/rest-and-sling-resolution-47406906
[3]
https://sling.apache.org/documentation/bundles/manipulating-content-the-slingpostservlet-servlets-po...
https://sling.apache.org/documentation/bundles/rendering-content-default-get-servlets.html
Views
Replies
Total Likes
Hi,
The link http://apachecon.com/presentation/materials/0000/0531/restful-sling-bdelacretaz-2010-101103132313-ph... is resulting in "404 Not Found" error.
Kindly suggest.
Thanks,
Rama.
Views
Replies
Total Likes
AEM Forum wrote...
Hi,
The link http://apachecon.com/presentation/materials/0000/0531/restful-sling-bdelacretaz-2010-101103132313-ph... is resulting in "404 Not Found" error.
Kindly suggest.
Thanks,
Rama.
Check this:- https://svn.apache.org/repos/infra/apachecon/archive.apachecon.com/c/acna2010/sessions/materials/Wed...
~kautuk
Views
Replies
Total Likes
This works.
Thanks,
Rama.
Views
Replies
Total Likes
Thank you MC, it is really helpful. Am basically looking to consume third party REST API. So I assume no OOB component
Views
Replies
Total Likes
"I am basically looking to consume third party REST API"
We have an end to end article on how to write a AEM Component that can invoke a 3rd party Restful endpoint:
1 - https://helpx.adobe.com/experience-manager/using/restful-services.html
2 - http://scottsdigitalcommunity.blogspot.ca/2016/09/creating-aem-html-template-language.html (displays the data in a HTL component). This has a video too on the AEM Commmunity YouTube Channel
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies