2 Replies Latest reply on Oct 4, 2015 11:16 PM by pradeepgm

    How to DELETE an Event (Event Extension) through REST service (V3 API)

    pradeepgm

      Hi,

       

      Is there any V3 API available to delete an Event (Event extension)? We have a requirement to delete certain events through REST service. If it is not available, is there any generic content API available to delete an Event content type?

       

      Thanks

      Pradeep GM

        • Re: How to DELETE an Event (Event Extension) through REST service (V3 API)
          cgum

          Hi Pradeep Kumar,

           

          If you use the V3 REST API, you can initially find the events like this... (just paste this into the browser window after your Jive base URL to see the output).

           

          /api/core/v3/contents?filter=type(event)&fields=-author,-authors,-attendance

           

          You can see that I'm removing the author, authors and attendance properties just to keep the output a little cleaner.

           

          In the results that you get back (within the "list" array), each item will have a "resources" property.  Under that you will see a resource named "self".  That will have "ref" and "allowed" properties.  For the "self" resource, you should notice that "allowed" would have values of GET, DELETE and PUT (If you only see GET, you might need to log in as someone with higher permissions).  "ref" will be the URL to the event.  So if you perform a DELETE of the value in the "ref", you should be able to delete the event through the REST API.

           

          Alternatively, you can find the "contentID" property on the event

           

          e.g.

          /api/core/v3/contents?filter=type(event)&fields=contentID,subject,-resources

           

          and just do a DELETE of /api/core/v3/contents/{contentID}

           

          Hope that helps!

          Casey