Retrieve the saved stories service document 

When you are viewing the latest updates listed on the Home page, you can mark an update as something you would like to read later by saving it as a saved story. A person's saved stories are listed in a collection. If you plan to update that collection using the resources made available through the Atom APIs, first retrieve the user's saved stories service document.

Table 1. Atom API request details

Method Resource URI Description
GET Service document /news/atom/service Accesses a user's service document to retrieve links to saved stories.


Example

To retrieve the service document for the stories saved by a specific user in the Home page application, send the following request:

GET /news/atom/service HTTP/1.1
 Authorization: Basic xxx
 Host: enterprise.example.com:9448
 Accept: */*> GET /news/atom/service HTTP/1.1

The HTTP response would look as follows:

< HTTP/1.1 200 OK
< X-LConn-Auth: false
< Content-Type: application/atomsvc+xml
< Content-Language: en-US
< Set-Cookie: xxx; Path=/; Domain=.enterprise.example.com
< Set-Cookie: xxx; Path=/; Domain=.enterprise.example.com
< Transfer-Encoding: chunked
< Date: Wed, 24 Jun 2009 16:11:51 GMT
< Server: WAS/6.1
< Expires: xxx
< Cache-Control: no-cache="set-cookie, set-cookie2"

The service document for the Home page saved stories application is returned. For example:

<service 
 xmlns:atom="http://www.w3.org/2005/Atom" 
 xmlns="http://www.w3.org/2007/app">
  <atom:generator 
   xmlns:atom="http://www.w3.org/2005/Atom" 
   version="2.5" 
   uri="http://www.ibm.com/xmlns/prod/sn">
    IBM Connections - News Story service
  </atom:generator> 
  <workspace>
    <atom:title 
     xmlns:atom="http://www.w3.org/2005/Atom" 
     type="text">
      IBM Connections - Stories saved by Lyla Miller
    </atom:title> 
    <atom:category 
     xmlns:atom="http://www.w3.org/2005/Atom" 
     term="views" 
     scheme="http://www.ibm.com/xmlns/prod/sn/workspace" /> 
    <collection 
     href="https://enterprise.example.com/news/atom/stories/saved?
      userid=937835c0-8f0a-1028-8a08-db07163b51b2">
      <atom:title xmlns:atom="http://www.w3.org/2005/Atom" type="text">
        IBM Connections - Stories saved by Lyla Miller
      </atom:title> 
      <atom:category 
       xmlns:atom="http://www.w3.org/2005/Atom" 
       term="saved-news" 
       scheme="http://www.ibm.com/xmlns/prod/sn/collection" /> 
      <accept>entry</accept> 
      <categories 
       xmlns:atom="http://www.w3.org/2005/Atom" 
       fixed="yes" 
       scheme="https://enterprise.example.com/news/atom/service/flags" /> 
    </collection>
  </workspace>
</service>


Parent topic

News repository APIs


   

 

});

+

Search Tips   |   Advanced Search