Community articleRetrieving microblog entries
Added by IBM contributorIBM on April 15, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.

Overview


The APIs discussed here can be ussed to retrieve messages from the microblogging service. There are two kinds of posts that can be made:
  • Microblog entries - these are either messages posted to a users own board (their status updates) or posts made to another users board.
  • Microblog comments - these are posted in response to existing microblog entries

Details




The standard Open Social paging parameters can be used to filter the number of entries received, including:
  • startIndex = N
  • count = N
  • sortBy=published
  • sortOrder=ascending | descending
Input
Method URI Description
GET /connections/opensocial/basic/rest/ublog/@me/@all Updates to my board
GET /connections/opensocial/basic/rest/ublog/{userId}/@all Updates to a given user's board
GET /connections/opensocial/basic/rest/ublog/{userId}/@all/{postId}/comments Comments on a given message
Name Type Optional Description
userId
string No is a any valid user id (including the current user in which case it is the same as specifying @me )
postId
string No is the id returned for a microblog entry (see example below)
Name Type Optional Description
startIndex
int Yes startIndex (as per standard Open Social paging parameters)
count
int Yes count (as per standard Open Social paging parameters)
sortBy
string Yes sortBy (as per standard Open Social paging parameters)
e.g. published
sortOrder
enumerated Yes sortOrder (as per standard Open Social paging parameters)
Authorized values:
  • ascending
  • descending
Output
Content Type: application/json
Examples
The data model returned is a subset of that used by the Activity Stream. On retrieval you will see the following for example:

Response returned by the server
 {

    "startIndex" : 0,

    "totalResults" : 2,

    "filtered" : true,

    "itemsPerPage" : 2,

    "sorted" : true,

    "list" : [

            {

                "summary" : "Another microblog entry",

                "replies" : {

                   . . . . .

                },

                "content" : "Another microblog entry",

                "objectType" : "note",

                "author" : {

                   . . . . .

                },

                "id" : <postid>,

                "likes" : {

                   . . . . .

                },

                "published" : "2012-08-17T12:41:42.224Z",

                "url" : "http://myserver.com/profiles/html/profileView.do?userid=USERID"

            }],

    "updatedSince" : true

}