Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

How to Get TagId using TagName in with TagManger API

Avatar

Level 2

Hi All,

i was looking for a way to read the TagId Eg: Sea:Water/Fish from TagName Eg: Fish

i read the Tag Manager API Doc, TagManager (Adobe AEM 6.0.0 API 6.0.0 API)

it has Two methods to Find Tag Details'

TagManager.FindResults findByTitle(String title)

RangeIterator<Resource> find(String tagID)

But my case is different Here,

i don't have TagId, TagTile, all i have is Tag Name,

Wondering is there any way to get the tagId using tagName ?

Thanks

Raj

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi Raj,

You can try using TagManager.resolveByTitle("tagTitlePath") or TagManager.resolve("tagPath"). Once you get the Tag object you will be able to get the Tag ID from it using Tag.getTagID() method.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

Hi Raj,

You can try using TagManager.resolveByTitle("tagTitlePath") or TagManager.resolve("tagPath"). Once you get the Tag object you will be able to get the Tag ID from it using Tag.getTagID() method.