Skip to end of metadata
Go to start of metadata

About

Atom APIs provided with IBM® Connections 4 allows to start following a resource included a Forum. 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

API Request Details

Type

POST
URL

{host}/forums/ajax/subscribeForum?subscribe=true&forumId={forum-id}

Example:  

https://www.mysite.com/forums/ajax/subscribeForum?subscribe=true&forumId=59e9-d2f8-4abd-b331-e85809

ResponseStatus Code: 200 OK
Example using jQuery

$.ajax({
    url : "https://www.mysite.com/forums/ajax/subscribeForum?subscribe=true&forumId=59e9-d2f8-4abd-b331-e85809",
    type : "POST"
    async : true
    statusCode : {
        200 : function() {
            console.log('success');
        }
    },
    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

  • No labels