Skip to end of metadata
Go to start of metadata

About

IBM Connections 4 allows to repost an entry (not all the types of) in a similar way to retweet a tweet on Twitter. Here's one easy way to do it with an asynchronous HTTP (Ajax) request using jQuery.

There is no a link to IBM Connections 4 documentation.

Atom API Request Details

Header

Content-Type : application/json

Type

POST

URL

{host}/connections/opensocial/rest/activitystreams/@me/@all/@all

Example

http://www.mysite.com/connections/opensocial/rest/activitystreams/@me/@all/@all

Response

Status Code: 200 OK

Example Request

{"verb":"bump","id":"urn:lsid:lconn.ibm.com:profiles.story:9c12-7f-49-d3-8401"}

Note

The id in the json request corresponds to the eventId of the entry that is part of the OpenSocial JSON.

We have tested Repost with events that match the eventType: profiles.status.updated, profiles.wallpost.created

Example using jQuery

var strData = '{"verb":"bump","id":"urn:lsid:lconn.ibm.com:profiles.story:9c12-7f-49-d3-8401"}';

$.ajax({
    url : "http://www.mysite.com/connections/opensocial/rest/activitystreams/@me/@all/@all",
    type : "POST",
    contentType: "application/json",
    async : true,
    data: strData,
    statusCode : {
        200 : function() {
            console.log('The entry has been reposted');
        }
    },
    error: function(jqXHR, textStatus, errorThrown) {
        console.log(jqXHR + " - " + textStatus + ' - ' + errorThrown);
    }
});

Note:  console.log can throw errors in IE, they are there for illustrative purposes only and should be changed as required.

About the author

Enterprise Web Developer
Joaquin is an Enterprise Web Developer at Base22 with over seven years of experience designing and developing web solutions for enterprise clients. He is a well rounded web developer with skills building interfaces in IBM WebSphere Portal and WCM, IBM Connections, and many others. He is an Oracle Certified Java Developer and a Microsoft Certified Visual Studio Developer. He blogs at http://j-arellano.com