Getting a feed of recent posts for a blog
Added by IBM contributorIBM | Edited by IBM contributorPaul Bastide on December 21, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Get a feed that lists all of the posts in a specific blog from most recent to oldest.

Usage notes

This request returns a feed of all the blog posts as opposed to returning the Atom entry of a single blog post. If you want to return an Atom entry of a single blog post, see Retrieving a blog post.

The following resources are available from the recent posts feed:

  • A current copy of this Atom Feed Document (self link).
  • An HTML representation of this feed (alternate link).
  • Blog post comments feed (replies link in post entries).
  • Blog post comments collection (comments collection in post entries).
  • A feed of the people who have recommended a Blog post.
  • Recommend a blog post.
  • Report inappropriate content to administrator link (reports link in post entries)..

Example

To search the posts in a blog that has the handle amy11Blog, send the following HTTP request:

The HTTP response would look as follows:

< HTTP/1.1 200 OK

< Last-Modified: Wed, 06 Feb 2008 22:52:20 GMT

< Cache-Control: public, must-revalidate, max-age=600

< Content-Type: application/atom+xml; charset=utf-8

< Content-Language: en-US

< Transfer-Encoding: chunked

< Date: Thu, 07 Feb 2008 13:33:22 GMT

< Server: WebSphere Application Server/6.1

 

Input
Method URI Description
GET /blogs/{handle}/feed/entries/atom {handle} represents the blog handle. A handle is specified when a blog is first created and is used in the construction of web addresses used to query the entries in a blog.
Name Type Optional Description
handle
string No {handle} represents the blog handle. A handle is specified when a blog is first created and is used in the construction of web addresses used to query the entries in a blog.
The handle can be the Community Uuid.
Name Type Optional Description
page
int Yes Page number. Specifies the page to be returned. The default value is 1, which returns the first page.
Note: Specifying 0 returns the first page also. This option is supported for backwards compatability only; it will be deprecated in a future release. Specifying 2 returns the second page.
ps
int Yes Page size. Specifies the number of entries to return per page. The default value is 10. The maximum value you can specify is 50.
search
string Yes Well-formed full text search query. Performs a text search of the blog posts.
since
string Yes Includes in the resulting feed all entries published after a specified date. Specify the date using a date-time value that conforms to RFC3339. In addition, an uppercase "T" character must be used to separate date and time, and an uppercase "Z" character must be present in the absence of a numeric time zone offset. For example: 2009-01-04T20:32:31.171Z.
sortBy
enumerated Yes Specifies what value to use as the basis for organizing the entries returned in the feed. The options are:
commented
Sorts the entries by the number of comments or replies an item has received.
modified
Sorts the entries by the last modified date.
popularity
Sorts the entries by how popular the item is.
recommended
Sorts the entries by the number of times the item was recommended.
title
Sorts the entries alphabetically by title. The title used is the text that is displayed in the <title> element of each entry in the feed.
Use with the sortOrder parameter to specify the order in which to display the results.
Authorized values:
  • commented
  • modified
  • popularity
  • recommended
  • title
sortOrder
enumerated Yes Specifies the order in which to sort the results. The options are:
asc
Sorts the results in ascending order.
desc
Sorts the results in descending order.
Authorized values:
  • asc
  • desc
tags
string Yes Returns blog posts with the specified tags. Separate multiple tags with a plus sign (+).
Output
Content Type: application/atom+xml
Examples
> GET /blogs/amy11Blog/feed/entries/atom HTTP/1.1

> Host: blogs.enterprise.example.com:9082

> Accept: */*

Response returned by the server
<?xml version="1.0" encoding="utf-8" ?> 

  <feed 

   xmlns="http://www.w3.org/2005/Atom" 

   xmlns:app="http://www.w3.org/2007/app" 

   xmlns:thr="http://purl.org/syndication/thread/1.0" 

   xmlns:snx="http://www.ibm.com/xmlns/prod/sn" 

   xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" 

   xml:lang="en-US">

    <id>urn:lsid:ibm.com:blogs:entries-f08f56e6-dc1a-4946-acf0-45511c9465a1</id> 

    <title type="text">Using Sametime</title> 

    <subtitle type="html" /> 

    <link 

     rel="self" 

     type="application/atom+xml" 

     href="https://blogs.enterprise.example.com:9444/blogs/usest/feed/entries/

      atom?lang=en_us" /> 

    <link 

     rel="edit" 

     href="https://blogs.enterprise.example.com:9444/blogs/BVThome0730095558/api/

      blogs/f08f56e6-dc1a-4946-acf0-45511c9465a1?lang=en_us" 

     type="application/atom+xml" /> 

    <link 

     rel="alternate" 

     type="text/html" 

     href="https://blogs.enterprise.example.com:9444/blogs/usest?lang=en_us" /> 

    <link rel="replies" 

     type="application/atom+xml" 

     href="https://blogs.enterprise.example.com:9444/blogs/usest/feed/comments/

      atom?lang=en_us" /> 

    <link 

     rel="media" 

     type="application/atom+xml" 

     href="https://blogs.enterprise.example.com:9444/blogs/usest/feed/media/

      atom?lang=en_us" /> 

    <link 

     rel="http://www.ibm.com/xmlns/prod/sn/issues" 

     href="https://blogs.enterprise.example.com:9444/blogs/BVThome0730095558/feed/

      issuecategories/atom?lang=en_us" /> 

    <link 

     rel="first" 

     type="application/atom+xml" 

     href="https://blogs.enterprise.example.com:9444/blogs/usest/feed/entries/

      atom?lang=en_us" /> 

    <openSearch:totalResults>1</openSearch:totalResults> 

    <app:categories 

     href="https://blogs.enterprise.example.com:9444/blogs/usest/feed/tags/

      atom?lang=en_us" /> 

    <updated>2009-07-30T12:33:23-04:00</updated> 

    <generator uri="http://www.ibm.com/xmlns/prod/sn" version="2.5">

     IBM Connections - Blogs

    </generator> 

    <entry 

     xml:base="https://blogs.enterprise.example.com:9444/blogs/usest/entry/

      thoughts_on_using_sametime" 

     xml:lang="en-US">

      <id>urn:lsid:ibm.com:blogs:entry-26619d6a-8449-4f82-aa1e-ec276af65dc5</id> 

      <title type="text">Thoughts on using Sametime</title> 

      <author>

        <name>Lou Green</name> 

        <email>lgreen@us.example.com</email> 

        <snx:userid>5b788f40-7d67-102c-845c-e2ebc3ec5536</snx:userid> 

        <snx:userState xmlns:snx="http://www.ibm.com/xmlns/prod/sn">active</snx:userState>

      </author>

      <link 

       rel="alternate" 

       type="text/html" 

       href="https://blogs.enterprise.example.com:9444/blogs/usest/entry/

        thoughts_on_using_sametime?lang=en_us" /> 

      <link 

       rel="self" 

       type="application/atom+xml" 

       href="https://blogs.enterprise.example.com:9444/blogs/usest/feed/entry/

        atom?entryid=26619d6a-8449-4f82-aa1e-ec276af65dc5&lang=en_us" /> 

      <link 

       rel="replies" 

       type="application/atom+xml" 

       href="https://blogs.enterprise.example.com:9444/blogs/usest/feed/

        entrycomments/thoughts_on_using_sametime/atom?lang=en_us" 

       thr:count="1" /> 

      <link 

       rel="http://www.ibm.com/xmlns/prod/sn/reports" 

       href="https://blogs.enterprise.example.com:9444/blogs/BVThome0730095558/

        api/reports/26619d6a-8449-4f82-aa1e-ec276af65dc5?lang=en_us" /> 

      <link 

       rel="http://www.ibm.com/xmlns/prod/sn/recommendations" 

       href="https://blogs.enterprise.example.com:9444/blogs/usest/feed/

        entryrecommendations/26619d6a-8449-4f82-aa1e-ec276af65dc5/

        atom?lang=en_us" /> 

      <app:collection 

       href="https://blogs.enterprise.example.com:9444/blogs/usest/api/

        entrycomments/26619d6a-8449-4f82-aa1e-ec276af65dc5?lang=en_us">

        <title type="text">Comment Entries</title> 

        <category 

         scheme="http://www.ibm.com/xmlns/prod/sn/collection" 

         term="comments" /> 

        <app:categories fixed="yes" /> 

        <app:accept>application/atom+xml;type=entry</app:accept> 

      </app:collection>

      <app:collection 

       href="https://blogs.enterprise.example.com:9444/blogs/usest/api/recommend/

        entries/26619d6a-8449-4f82-aa1e-ec276af65dc5?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>

      <published>2009-07-30T12:31:36-04:00</published> 

      <updated>2009-07-30T12:31:36-04:00</updated> 

      <category term="st" /> 

      <link 

       rel="related" 

       type="text/html" 

       href="https://blogs.enterprise.example.com:9444/blogs/usest/tags/

        st?lang=en_us" /> 

      <content type="html">

        <! [CDATA [  Installed Notes including Sametime and am now seeing the 

         business card in the product user interface.<br>I find it very useful 

         for accessing contact information for people that I exchange email 

         with.<br>

         ]]&gt; 

      </content>

      <summary type="html">

        <! [CDATA [  Installed Notes including Sametime and am now seeing the 

         business card in the product user interface. I find it very useful for 

         accessing contact information for people that I exchange email with.

         ]]&gt; 

      </summary>

      <snx:rank 

       scheme="http://www.ibm.com/xmlns/prod/sn/recommendations">1</snx:rank> 

      <snx:rank 

       scheme="http://www.ibm.com/xmlns/prod/sn/comment">1</snx:rank> 

      <snx:rank 

       scheme="http://www.ibm.com/xmlns/prod/sn/hit">4</snx:rank> 

      <source>

        <id>urn:lsid:ibm.com:blogs:entries-f08f56e6-dc1a-4946-acf0-45511c9465a1</id> 

        <title type="text">Using Sametime</title> 

        <link 

         type="application/atom+xml" 

         rel="self" 

         href="https://blogs.enterprise.example.com:9444/blogs/usest/feed/entries/

          atom?lang=en_us" /> 

        <link 

         type="text/html" 

         href="https://blogs.enterprise.example.com:9444/blogs/usest?lang=en_us"/> 

        <updated>2009-07-30T12:33:23-04:00</updated> 

      </source>

    </entry>

  </feed>