Skip to end of metadata
Go to start of metadata

About

If you have already voted  for an idea, you can undo the vote by sending a request to the web address of the idea posting. Here's one easy way to do it with an asynchronous HTTP (Ajax) request using jQuery.

IBM Connections 4 documentation link: Unvote an idea

Atom API Request Details

Type

DELETE
URL

{host}/blogs/{blog-id}/api/recommend/entries/{idea-id}

Example:

https://www.mysite.com/blogs/f3808be0-8a2e-a3f97/api/recommend/entries/74d47e84-83f4-7cc5a0

ResponseStatus Code: 204 No Content
Example using jQuery

$.ajax({
    url : "https://www.mysite.com/blogs/f3808be0-8a2e-a3f97/api/recommend/entries/74d47e84-83f4-7cc5a0",
    type : "DELETE",
    async : true,
    statusCode : {
        204 : function() {
            console.log('Undo vote');
        }
    },
    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