Forum Discussion

kc's avatar
kc
Ace
11 years ago

Access custom tags through REST API

What level of access do we have with custom tags through API? Specification, I'd like to do the following:

 

- List available tags within a board

- Get currently applied tags of a message

- Add/remove tags of a message

- Get who and when a tag was added

 

Thanks.

kc

3 Replies

  • YuriK's avatar
    YuriK
    Khoros Expert
    11 years ago

    Hey kc,

     

    We have many different tagging APIs. For your specific questions you should take a look at the following pages.

     

    • For getting information about tags used in a board look at Board.tagging (the /tagging/tags/all call will get you all tags applied to any message on a board)
    • For getting information about tags on a message look at Message.tagging 
    • Adding and removing tags can be done using /tagging/tags/add and /tagging/tags/remove, which you can see here Message.taggin
    • I don't believe we currently support getting specific timestamps of tag events via Rest API, but you can tags ordered by recency using the tagging/tags/recent call Messages.tagging.recent. Also you can get tags that a specific user has added using the /tags/for/users/id/[user_id] filter.

    Hope this helps,

     

    Yuri

  • YuriK's avatar
    YuriK
    Khoros Expert
    11 years ago

    Ah, sorry about that.

     

    I see you've already found the Using the Rest API with Custom Tags page. As you pointed out there, you would need to know the key for each custom tag. 

     

    You can use the following filter to get posts where a custom tag is set:

     

    posts/for/metadata/key/[key]/value/[value]

     Note: in the case where you have an attribute tag, set [value] to true

     

    You can use the following calls to set and remove tags: 

     

    metadata/key/[key]/reset

     

     

    metadata/key/[key]/set

     

     

    Unfortunately, this only covers one and a half or your use cases. Can you please add your request to the Customer Ideas board?

     

    Thank you,

     

    Yuri