Stop following a resource 

To stop following a resource, use the HTTP DELETE method.

See Authenticating requests for information about how to authenticate the request.

Table 1. Atom API request details

Method Resource URI Input and output representations
DELETE follow entry Value of the href attribute of <link> element that has a rel="edit" attribute value for each entry in the following feed. none


Input

None.


Output

None.

Returned HTTP headers

HTTP/1.1 204 No Content

Error codes

For example, to stop following something, 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>

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


Parent topic

Follow API

+

Search Tips   |   Advanced Search