API reference
This API reference is applicable only for the server version of the Polls for Confluence app.
Click any of the following API methods to know more:
Note that the authentication method used is basic authentication for all the operations.
Points to remember
You can create a poll even if you provide the mandatory parameters only. The default values for the optional parameters, if any, are then used.
By default, a choice poll is created unless the datePoll parameter is set as true to create an event poll.
Common parameters
Parameters used for both choice and event polls are listed below:
Name | Default value | Required? | Description | Example |
---|---|---|---|---|
name | Â | Mandatory | Name for the poll. |
|
description | Â | Optional | Description about the poll. |
|
enddate | Â | Optional | End date; till when the poll is available.This should be always greater than current date. Format to be used: yyyy-MM-dd |
|
datePoll | false | Optional | Indicate if this is a choice poll or an event poll.
|
|
nonUserVotesAllowed | false | Optional | Indicate if unregistered users are allowed to vote.
|
|
pollAnonymous | false | Optional | Indicate if users can vote anonymously.
|
|
votersVisible | true | Optional | Indicate if the names of the voters can be displayed. Set to false to hide the voter names. |
|
resultsBeforeClosed | true | Optional | Indicate if the result can be displayed before the poll is closed. Set to false to hide the poll result. |
|
undoAllowed | true | Optional | Indicate if users can change their vote. Set to false to keep the vote as-is. |
|
multipleChoice | false | Optional | Indicate if users can select multiple choices. Set to true to allow users to make multiple choices. |
|
optionsExtendable | false | Optional | Indicate if users can add custom choices. Set to true to allow users to create their own choice option. |
|
tinyUrlEnabled | false | Optional | Indicate if a tiny URL for the poll is to be generated (usually to be sent in mails). Set to true to create a tiny URL for the poll. |
|
Parameters specific to choice polls
Parameters specific to choice polls are as follows:
Parameter | Default value | Required? | Description | Example |
---|---|---|---|---|
percentsVisible | true | Optional | Indicate if poll votes is to be displayed in percentages. Set to false to hide the percent values. |
|
voteCountVisible | true | Optional | Indicate if the vote counts per option is to be displayed for the poll. Set to false to hide the counts. |
|
options, stringValue | Â | Mandatory | Provide an array of values (choices) using the stringValue attribute. At least two choices must be given for a choice poll. |
|
Parameters specific to event polls
Parameters relevant to event polls are as follows:
Parameter [Attributes] | Default value | Required? | Description | Example |
---|---|---|---|---|
options, dateValue, stringValue | Â | Mandatory | Provide an array of dates (dateValue) and the time representation for each date (stringValue).
|
|
Â