Home
Recommending a blog posting
If you have not already recommended a blog posting, you can do so by sending a request to the Web address of the recommendations collection for the blog posting.
See Authenticating requests for information about how to authenticate the request.
Atom API request details
Method Resource URI Input representation POST None Value of the href attribute of the <app:collection> element that has a child <title> element with a value of Recommendations in the blog entry. None To recommend a blog entry...
- You can only recommend an entry once. To find out whether you have already recommended an entry, retrieve a list of the people who have recommended the entry and see if your name is included. See Getting a list of recommenders for more details. Alternatively...
- Retrieve an entries feed that contains the entry. See Getting a feed of the latest posts added to all blogs or Getting a feed of recent posts for a blog for more information.
- Find the Recommendations collection element for the entry, and then look for a <app:accept/> element. If this element is present, you have already recommended this entry and cannot do so again. If no <app:accept/> is present, you have not recommended the entry yet. For example, the Recommendations collection for an entry that you have not recommended would look as follows:
<app:collection href="https://enterprise.acme.com:9444/blogs/amyblog/api/recommend/entries/ 1fa2dae3-f0af-457c-bfe7-eec0f5f01833?lang=en_us"> <title type="text">Recommendations</title> <category scheme="http://www.ibm.com/xmlns/prod/sn/collection" term="recommend" /> <app:categories fixed="yes" /> </app:collection>
- To recommend the entry, send an empty POST request to the Web address listed as the href of the app:collection.
Input
None.
Output
None. Returned HTTP Header
- HTTP/1.1 200 OK
- Indicates that the recommendation was successfully created. If an error occurs, this header will contain one of the error codes below.
Error codes
- HTTP/1.1 400 Bad request: The user has already recommended the entry.
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 404 Not Found: Either the weblog or the entry is not found.
Related reference
Get a feed of the latest posts added to all blogs
Get a feed of recent posts for a blog