Retrieve the Bookmarks service document
The first step perform if you plan to update resources made available through the Atom APIs is to retrieve the service document for the application.Table 1. Atom API request details
Method Resource URI Description GET Service Document /api/app Retrieves a user's service document which defines a single workspace containing the user's collection of bookmarks.
Example
To retrieve the service document for the Bookmarks application, send the following HTTP request:
> GET /dogear/api/app HTTP/1.1 > Authorization: Basic ... > Host: dogear.enterprise.example.com:9084 > Accept: */* > < HTTP/1.1 302 Found < Location: https://dogear.enterprise.example.com:9447/dogear/api/app < Content-Language: en-US < Content-Length: 0 < Date: Tue, 26 Feb 2008 17:35:19 GMT < Server: WAS/6.1 ... > GET /dogear/api/app HTTP/1.1 > Authorization: Basic ... > Host: dogear.enterprise.example.com:9447 > Accept: */*The HTTP response would look as follows:
< HTTP/1.1 200 OK < Content-Type: application/atomsvc+xml; charset=UTF-8 < Pragma: private < Cache-Control: private, no-cache=set-cookie < Content-Language: en-US < Set-Cookie: JSESSIONID=0000DjFA1vb88VDN0OKtoGS1OfG:-1; Path=/ < Transfer-Encoding: chunked < Date: Tue, 26 Feb 2008 17:35:19 GMT < Server: WAS/6.1 < Expires: Thu, 01 Dec 1994 16:00:00 GMTThe service document for Bookmarks is returned by the server. For example:
<?xml version="1.0" encoding="utf-8" ?> <service> <atom:generator uri="http://www.ibm.com/xmlns/prod/sn" version="3.0.1.0"> IBM Connections - Bookmarks </atom:generator> <workspace> <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/workspace" term="views"/> <atom:title>My Bookmarks</atom:title> <collection href="https://dogear.enterprise.example.com:9447/dogear/api/app?email=jdoe6%40example.com"> <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="personal"/> <atom:title>Entries</atom:title> <accept>entry</accept> <categories href="https://dogear.enterprise.example.com:9447/dogear/tags?email=jdoe6%40example.com"/> <categories href="https://dogear.enterprise.example.com:9447/dogear/api/app/flags"/> </collection> <collection href="https://dogear.enterprise.example.com:9447/dogear/api/notify"> <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="send-notification"/> <atom:title>Send notifications</atom:title> <accept>entry</accept> <categories fixed="yes"> <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="notification"/> </categories> </collection> </workspace> </service>If IBM Connections is configured to prevent email addresses from being displayed, the following content would be returned:
<?xml version="1.0" encoding="utf-8" ?> <service> <atom:generator uri="http://www.ibm.com/xmlns/prod/sn" version="3.0.1.0"> IBM Connections - Bookmarks </atom:generator> <workspace> <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/workspace" term="views"/> <atom:title>My Bookmarks</atom:title> <collection href="https://dogear.enterprise.example.com:9447/dogear/api/app?userid=472835c0-8f0a-1028-8a08-db08123b51b2"> <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="personal"/> <atom:title>Entries</atom:title> <accept>entry</accept> <categories href="https://dogear.enterprise.example.com:9447/dogear/tags?userid=472835c0-8f0a-1028-8a08-db08123b51b2"/> <categories href="https://dogear.enterprise.example.com:9447/dogear/api/app/flags"/> </collection> <collection href="https://dogear.enterprise.example.com:9447/dogear/api/notify"> <atom:category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="send-notification"/> <atom:title>Send notifications</atom:title> <accept>entry</accept> <categories fixed="yes"> <category scheme="http://www.ibm.com/xmlns/prod/sn/type" term="notification"/> </categories> </collection> </workspace> </service>
Parent topic
Bookmarks API
});