Stop following a resource
Added by IBM contributorIBM | Edited by IBM contributorPaul Bastide on July 21, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

You can call the Follow API with the DELETE method to stop receiving notifications for a resource.

 

Input
Method URI Description
DELETE /{source}/follow/atom/resources/{entryId}?source={source} Value of the href attribute of <link> element that has a rel="edit" attribute value for each entry in the following feed.
Name Type Optional Description
source
enumerated No String specifying the resource. Options are: activities blogs communities files forums profiles wikis tags This parameter is required.
Authorized values:
  • activities
  • blogs
  • communities
  • files
  • forums
  • profiles
  • wikis
  • tags
entryId
string No The ID of the entry you wish to access
Name Type Optional Description
type
enumerated No String representing the resource type. Options are: If source=activities activity If source=blogs blog If source=communities community If source=files file file_folder If source=forums forum forum_topic If source=profiles profile If source=wikis wiki wiki_page If source=tags tag This parameter is required.
Authorized values:
  • activity
  • blog
  • community
  • file
  • file_folder
  • forum
  • forum_topic
  • profile
  • wiki
  • wiki_page
  • tag
resource
string No The ID of the resource you wish to access
Output
Code Description
204
Indicates that you have successfully stopped following the specified resource and no content is returned.
400
Bad Request.
403
Forbidden.
404
Not Found.
401
Unauthorized. Returned when no authenticated user or no userid, email, or key parameter are provided on the request.
Examples
to stop following something, you must first find the resource that you want to stop following in the following feed. From the Following service document for the application, retrieve the web address of the collection from its href attribute. Send a GET request to that web address to retrieve the Following feed. For example, if the collection looks like this:
<service>

  <atom:generator version="3.0" uri="http://www.ibm.com/xmlns/prod/sn">

   IBM Connections - Follow service

  </atom:generator>

  <workspace>

    <atom:title type="text">Follow service for John Donne</atom:title>

    <collection 

     href="https://enterprise.example.com/blogs/follow/atom/resources?

      source=blogs&type=blog">

...

</service>


Response returned by the server
You would send the GET request to the https://enterprise.example.com/blogs/follow/atom/resource?source=blogs&type=blog web address. This returns the Following feed, which might look like this:

<feed>

  <generator uri="http://www.ibm.com/xmlns/prod/sn" version="3.0.1.0">

   IBM Connections - Follow service

  </generator>

  <title type="text">Followed resources for John Donne</title>

  <updated>2010-09-15T17:53:26.864Z</updated>

  <id>

   urn:lsid:ibm.com:follow:feed-com.ibm.lc.1bc09022-0655-4543-a053-93e57e4cec44

  </id>

  <openSearch:itemsPerPage>20</openSearch:itemsPerPage>

  <openSearch:startIndex>1</openSearch:startIndex>

  <openSearch:totalResults>1</openSearch:totalResults>

  <link 

   rel="self" 

   href="https://enterprise.example.com/blogs/follow/atom/resources?ps=20&page=1&

    source=blogs&type=blog&lang=en_us" 

   type="application/atom+xml"/>

  <link 

   rel="alternate" 

   href="https://enterprise.example.com/blogs" 

   type="text/html"/>

  <author>

    <name>John Donne</name>

    <snx:userid>50730340-0101-102e-88e1-f78755f7e0ed</snx:userid>

    <snx:userState>active</snx:userState>

    <email>jdonne@example.com</email>

    <uri>

     https://enterprise.example.com/profiles/html/profile.do?

      userid=50730340-0101-102e-88e1-f78755f7e0ed

    </uri>

  </author>

  <entry>

    <id>

     urn:lsid:ibm.com:follow:resource-c78275d7-8844-4f0f-9b98-356a5f4cb6b8

    </id>

    <category term="resource-follow" scheme="http://www.ibm.com/xmlns/prod/sn/type"/>

    <category term="blogs" scheme="http://www.ibm.com/xmlns/prod/sn/source"/>

    <category term="blog" scheme="http://www.ibm.com/xmlns/prod/sn/resource-type"/>

    <category 

     term="5f85a6ad-8276-4697-b4df-8b9152353430" 

     scheme="http://www.ibm.com/xmlns/prod/sn/resource-id"/>

    <title type="text">Lotus Software Blog Entry60942</title>

    <link 

     href="https://enterprise.example.com/blogs/follow/atom/resources/

      c78275d7-8844-4f0f-9b98-356a5f4cb6b8?source=BLOGS&type=BLOG&

      resource=5f85a6ad-8276-4697-b4df-8b9152353430" 

     rel="edit" 

     type="application/atom+xml"/>

    <link 

     href="https://enterprise.example.com/blogs/roller-ui/rendering/feed/BlogHome60942/

      entries/atom" 

     rel="related" 

     type="application/atom+xml"/>

    <link 

     href="https://enterprise.example.com/blogs/BlogHome60942" 

     rel="alternate" 

     type="text/html"/>

  </entry>

</feed>



To stop following a resource, find its rel="edit" link and send a DELETE request to the web address specified in its href attribute. In this case, the only resource being followed has the following edit link URL: https://enterprise.example.com/blogs/follow/atom/resources/c78275d7-8844-4f0f-9b98-356a5f4cb6b8?source=BLOGS&type=BLOG&resource=5f85a6ad-8276-4697-b4df-8b9152353430