Is there a way in the rest API for AEM 6.3 to view/edit/create tags? I am building an AEM integration with a customer where we can only interact with the rest API so I will not have access to the Java API.
Solved! Go to Solution.
Views
Replies
Total Likes
The best way to programmatically create a tag and use REST is to create a Sling Servlet:
http://www.aemcq5tutorials.com/tutorials/sling-servlet-in-aem/
In the Sling Servlet - use the Tag Manager API that creates the tag. Now you can invoke the Sling Servlet using Restful means.
See the TagManager API in the Javadocs here: "The CQ5 Quickstart and Web Application."
Using the Tag Manager is the best way.
Views
Replies
Total Likes
The best way to programmatically create a tag and use REST is to create a Sling Servlet:
http://www.aemcq5tutorials.com/tutorials/sling-servlet-in-aem/
In the Sling Servlet - use the Tag Manager API that creates the tag. Now you can invoke the Sling Servlet using Restful means.
See the TagManager API in the Javadocs here: "The CQ5 Quickstart and Web Application."
Using the Tag Manager is the best way.
Views
Replies
Total Likes
You can use OOTB servlet in AEM author at /bin/tagcommand with POST calls
com.day.cq.tagging.servlets.TagCommandServlet
It will create tags for you
sample post data
Views
Replies
Total Likes
Thanks for the response, do you know by chance if the cq_csrf_token can be generated programmatically from a separate server? We're trying to build a server-to-server integration so unless there's a way to also generate that token through a supported REST API endpoint I might have to keep looking.
Views
Replies
Total Likes
Creating a Sling Servlet looks like the best approach but will research some more. Thanks
Views
Replies
Total Likes
You are correct - by donig so - you can take advantage of the strongly typed Tag Manager API and then invoke it using HTTP.
Views
Replies
Total Likes
Views
Likes
Replies