1 Reply Latest reply on Sep 7, 2015 2:27 AM by siddhartha107

    update tags through REST API?

    lfl1001

      Hi Experts.

       

      I'm looking a method to update tag of threads (10000+) through REST API in batch. For example, a thread have tag1,tag2. I need to add tag3(new) then the thread will have tags " tag1 tag2 tag3(new)". Am I able to do that through REST API?

       

      I use Jive 6.

       

      Thanks

      -Fenglin

        • Re: update tags through REST API?
          siddhartha107

          Hey,

          As per my knowledge its possible to fetch tags using Rest API

          osapi.jive.core.get({

                          v: "v3",

                          href: "/contents/"+contentID+"" // contentID = id of the content

          });

          this would return you the content object. then may be you can add your tags and update it.

          First your question: I need to add tag3(new) then the thread will have tags " tag1 tag2 tag3(new)"

          Ans: This can be done by using libraries like ramda or lodash.. _.union(oldTags,newTags)

          Second Question:Am I able to do that through REST API?

          To update the content you need to pass the whole content object and not just the tags part.. and I guess it can not be done using REST api..

           

          Lemme know if this was helpful.

           

          Thanks,

          Siddhartha