Community articleVote an idea
Added by IBM contributorIBM on June 27, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

If you have not already vote an idea, you can do so by sending a request to the web address of the recommendations collection for the idea.

See Authenticating requests for information about how to authenticate the request.

To vote an idea, complete the following steps:

  1. You can only vote an idea once. To find out whether you have already vote an idea, retrieve a list of the people who have voted the idea and see if your name is included. See Getting a list of recommenders for more details. Alternatively, complete the following steps:
    1. Retrieve an ideas feed that contains the entry. See Getting a feed of the latest posts added to all blogs or Getting a feed of recent posts for a blog for more information.
    2. Find the Recommendations collection element for the idea, and then look for a element. If this element is present,you can not vote this idea(you have already vote this idea and cannot do so again or the ideation blog is frozen or user reach this ideation blog's vote limit when vote limit is enabled) . If no is present, you have not vote the idea yet , the ideation blog is open to vote and you have not reach the vote limit. For example, the Recommendations collection for an idea that you have not voted would look as follows:



	<title type="text">Recommendations</title> 



	term="recommend" /> 

	<app:categories fixed="yes" /> 


2. To vote an idea, send an empty POST request to the web address listed as the href of the app:collection.
3. It is configurable for how many times a person can cast vote per idea blog.

Find the Recommendations collection element for the entry, and then look for a <snx:votedt/> element. If this element is present, you have already voted for this idea and cannot do so again. If no <snx:voted/> is present, you have not voted for the entry yet. However, this information won't be correct if you have not logged in, and then we have no way to get your data.
Also, note that if the ideation blog is frozen or user have voted this idea, users can not vote, hence, <app:accept/> is presented in this case.
The total votes for an idea appear in the idea blog post entry
<snx:rank scheme="" xmlns:snx="">24</snx:rank>
  • As an owner of the blog, one can use this element inside the <app:control> element to disable/enable voting limit and set the max vote #

a. <snx:voteLimit enabled="no/yes" limit="#" xmlns:snx="{"></snx:voteLimit>
b. If voteLimit is disabled, limit= will not be showed
c. If this voteLimit element is not present in the UPDATE request, then it is assume this blog will set to unlimited votes
  • As a user, one can see how many votes left on the blog (per blog, not per entry)
a. This element appears under <feed> for any feed of entries for a single idea blog (subscription or publishing)
<snx:rank scheme="" xmlns:snx="">6</snx:rank>
b. If the # is 0, then no more votes left
c. If the # is -1, it means unlimited
d. If this element is not showed, it means unknown due to no user information. This can happens when the user is not logged in and getting the public subscription feed. User can POST a vote in this case, but he will need to log in and we will send back 403 forbidden if he has already voted.
  • To determine if you have voted for an idea:





Method URI Description
POST /blogs/{handle}/api/recommend/entries/{entryId} Value of the href attribute of the <app:collection> element that has a child <title> element with a value of Recommendations in the blog entry.
Content Type: application/atom+xml
Sample Request:
<-- Leave blank -->
Name Type Optional Description
string No {handle} represents the handle of the blog. A handle is a keyword that is specified when a blog is first created and is used in the construction of web addresses used to query the entries in a blog.
string No The ID of the blog entry
Code Description
Indicates that the recommendation was successfully created. If an error occurs, this header contains one of the error codes.
Bad request: The user has already liked the entry.
Not Found: Either the weblog or the entry is not found.