IBM Connections 4 API: How to Start Following a Community Using jQuery Ajax


Atom APIs provided with IBM® Connections 4 allows to start following a resource included a community, all you need to do is to send a follow Atom entry document on the request to identify what community you want to start following. Here's one easy way to do it with an asynchronous HTTP (Ajax) request using jQuery.

IBM Connections 4 documentation link: Start following a resource

Atom API Request Details


application/atom+xml; charset=UTF-8





Pass a follow Atom entry document on the request to identify what community you want to start following.



Status Code: 200 OK

Example Atom Entry

<?xml version="1.0" encoding="UTF-8"?>
    <category term="resource-follow" scheme=""></category>
    <category term="communities" scheme=""></category>
    <category term="community" scheme=""></category>
    <category term="f8be0-4be5-4cba-8a2e-743f97" scheme="">


In lines 3 and 7 add the Id of the Community to follow

Example using jQuery

var strData = '<?xml version="1.0" encoding="UTF-8"?>';
strData += '<entry><id></id>';
strData += '<category term="resource-follow" scheme=""></category>';
strData += '<category term="communities" scheme=""></category>';
strData += '<category term="community" scheme=""></category>';
strData += '<category term="f8be0-4be5-4cba-8a2e-743f97" scheme=""></category></entry>';    

    url : " ",
    type : "POST",
    contentType: "application/atom+xml; charset=UTF-8",
    async : true,
    data: strData,
    statusCode : {
        200 : function() {
    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