Hi All,
Can someone share the example of How to write the REST API GET method in AEM where data can be shared in the form of JSON when any client make the rest api call .
thanks
Solved! Go to Solution.
Views
Replies
Total Likes
For GET method make your servlet extend https://sling.apache.org/apidocs/sling5/org/apache/sling/api/servlets/SlingSafeMethodsServlet.html
Views
Replies
Total Likes
Hi Rish,
Have you checked the below link:
https://helpx.adobe.com/experience-manager/using/restful-services.html
~ Prince
Views
Replies
Total Likes
Hi
To write REST Get/post method, you need to create a JAVA Sling Servlet.
Link:-https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html
// Here is the example for this.
Here we are submitting data to POST method via AJAX call:-
Here URL is the path for request.
If you want to integrate or invoke 3rd party restful web service, see this
Link:- https://helpx.adobe.com/experience-manager/using/restful-services.html
// Creating Adobe Experience Manager bundles that invoke third party Restful web services
I hope this would help you.
~kautuk
Hi kautuk,
Can you share the example of custom JAVA Sling Servlet using the GET method where the data is entered by the author using the classic dialog is return in json format when the rest api get method request is made.
thanks
Views
Replies
Total Likes
For GET method make your servlet extend https://sling.apache.org/apidocs/sling5/org/apache/sling/api/servlets/SlingSafeMethodsServlet.html
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies