Bulk tags creation in aem from json

Avatar

Avatar
Boost 3
Level 3
kiranc13433869
Level 3

Likes

3 likes

Total Posts

60 posts

Correct reply

2 solutions
Top badges earned
Boost 3
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile

Avatar
Boost 3
Level 3
kiranc13433869
Level 3

Likes

3 likes

Total Posts

60 posts

Correct reply

2 solutions
Top badges earned
Boost 3
Validate 10
Validate 1
Ignite 5
Ignite 3
View profile
kiranc13433869
Level 3

12-11-2020

Hello,

 

I have this service creation requirement of tags creation.

i am using aem 6.5 version.

we have data in nested json format for creating tags.

eg: 

{

     "abc":{

           "jcr:title":"Abc",

           "pqr":{

                   "jcr:title":"PQR"

           },

           "xyz":{

                   "jcr:title":"XYZ"

           }

     }

}

from this json, my requirement is to create abc as parent tag then its title property. Child element of abc as pqr and xyz and in some scenarios we might have child elements of abc node as well

 

is it possible to create such tags hierarchy in aem under /content/cq:tags

please help.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Ignite 1
MVP
SureshDhulipudi
MVP

Likes

163 likes

Total Posts

174 posts

Correct reply

49 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Ignite 1
MVP
SureshDhulipudi
MVP

Likes

163 likes

Total Posts

174 posts

Correct reply

49 solutions
Top badges earned
Ignite 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
SureshDhulipudi
MVP

12-11-2020

If you are doing this manually

you can convert json to excel : https://json-csv.com/

and use ACS Commons Tag Creator Feature

In your AEM

Go to Tools --> ACS AEM Commons --> Manage Controlled Processes --> Start Process --> Tag Creator

http://localhost:4502/apps/acs-commons/content/manage-controlled-processes.html

 

you can upload the excel file and Start will generate / create Tags as expected.

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 3
prashantonkar
Level 3

Likes

17 likes

Total Posts

51 posts

Correct reply

7 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 3
prashantonkar
Level 3

Likes

17 likes

Total Posts

51 posts

Correct reply

7 solutions
Top badges earned
Validate 1
Ignite 1
Give Back 5
Give Back 3
Give Back
View profile
prashantonkar
Level 3

12-11-2020

com.day.cq.tagging.TagManager.createTagByTitle(String namespace,String tagPath)

This method takes complete tag path and creates the complete hierarchy of tags.