Forum Discussion

deepak's avatar
13 years ago

Tagging a post using REST APIs

Is there any possible rest api call to add a tag to a particular post and also rest api call to retrieve tags given to a particular post.

 

Thanks in advance.

  • Yes it is possible.

    Used the following rest api call

     

    http://<community>/restapi/vc/messages/id/7/edit?message.subject=subj&tag.add=rest

     

    Unfortunately, its i not possible to add the tag alone. It seems we need to change the subject as well even though it is mentioned as optional field in the rest api doc.

2 Replies

  • Yes it is possible.

    Used the following rest api call

     

    http://<community>/restapi/vc/messages/id/7/edit?message.subject=subj&tag.add=rest

     

    Unfortunately, its i not possible to add the tag alone. It seems we need to change the subject as well even though it is mentioned as optional field in the rest api doc.

  • AdamN's avatar
    AdamN
    Khoros Oracle
    13 years ago

    Hi deepak,

     

    You should be able to add a tag without editing the message. You can obtain a MessageTaggingContext object for a message, which has a method tags/add which can be used to add a tag. For example:

     

    /restapi/vc/messages/id/7/tagging/tags/add?tag.add=rest

     

    I'd suggest giving that a try, and let us know if that doesn't work for you.

     

    Regards,

     

    -Adam