Community articleCreating bookmarks in the Bookmarks application
Added by IBM contributorIBM on June 20, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars3 comments

To create a bookmark, send an Atom entry document containing the new bookmark to the bookmarks feed.



To create a bookmark, send an Atom entry document containing the new bookmark to the bookmarks feed.

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

Input


Provide a bookmark Atom entry document.

Note: The content type of the Atom entry document must be application/atom+xml.

Output


An Atom entry document containing the new bookmark entry.

 

Input
Method URI Description
POST /dogear/api/app Found in the href attribute of the <collection> element in the user's service document.
Content Type: application/atom+xml
Sample Request:
<?xml version="1.0" encoding="UTF-8"?>

<entry
        xmlns:atom="http://www.w3.org/2005/Atom"
        xmlns:snx="http://www.ibm.com/xmlns/prod/sn"
        xmlns:thr="http://purl.org/syndication/thread/1.0">
<category term="bookmark" scheme="http://www.ibm.com/xmlns/prod/sn/type">
</category>
<id>http://communities.ibm.com:2006/service/atom/community/bookmarks?communityUuid=050c03c9-e062-4804-a6fc-0462c880fcaf&amp;referenceId=f48a42ca-d00e-46d9-9abe-2d08b9bfaf4c</id>
<title type="text">IBM Bookmark Test NEW</title>
<summary type="text">IBM Description NEW</summary>
<content type="text">IBM Description NEW</content>
<published>2014-01-28T14:32:11.547Z</published>
<updated>2014-01-28T14:32:11.547Z</updated>

<category term="ibm">
</category>
<category term="sbt">
</category>
<link href="http://www.ibm.com/">
</link>
<link href="https://greenhousestage.lotus.com/communities/service/atom/community/bookmarks?communityUuid=050c03c9-e062-4804-a6fc-0462c880fcaf&amp;referenceId=f48a42ca-d00e-46d9-9abe-2d08b9bfaf4c" rel="self">
</link>
<link href="https://greenhousestage.lotus.com/communities/service/atom/community/bookmarks?communityUuid=050c03c9-e062-4804-a6fc-0462c880fcaf&amp;referenceId=f48a42ca-d00e-46d9-9abe-2d08b9bfaf4c" rel="edit">
</link>
</entry>
Name Type Optional Description
userid
string No User ID of the user that owns the bookmark feed that the entry is being created in.
Output
Content Type: application/atom+xml
Name Type Optional Description
Location
string No Link to edit_url of the new bookmark entry. You can use the web address specified here to subsequently retrieve and update the bookmark entry.
Code Description
201
Indicates that the bookmark was successfully created. If an error occurs, this header contains one of the error codes.
400
Bad Request.
403
Forbidden.
Michael Urspringer commented on Jan 29, 2016

Re: Creating bookmarks in the Bookmarks application

The documentation should be more clear to indicate that userid is also a valid and supported attribute

Michael Urspringer commented on Jan 29, 2016

Re: Creating bookmarks in the Bookmarks application

"Found in the href attribute of the element in the user's service document. ":

If you look in the returned information in the users's service document you see that the URLs all contains the email attribute. There is no indication that you can also use the "userid" of a user instead of "email" to e.g. create a new bookmark. This is especially important if you have users in Connections who do have an empty mail address.

Ying Ying Cheng commented on Dec 10, 2014

Re: Creating bookmarks in the Bookmarks application

Posting the sample entry to the given URI returns 400(Bad Request). It looks like a community bookmark which should not be handled by /dogear/api/app.

The following entry might work.

Bookmark Test