コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Can you see/edit/create tags in AEM rest API?

Avatar

以前のコミュニティメンバー

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.

1 受け入れられたソリューション

Avatar

正解者
Level 10

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.

元の投稿で解決策を見る

5 返信

Avatar

正解者
Level 10

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.

Avatar

Level 10

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

1370626_pastedImage_0.png

Avatar

以前のコミュニティメンバー

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.

Avatar

以前のコミュニティメンバー

Creating a Sling Servlet looks like the best approach but will research some more. Thanks

Avatar

Level 10

You are correct - by donig so - you can take advantage of the strongly typed Tag Manager API and then invoke it using HTTP.