Create poll
Create a unique poll.
A choice poll is created by default with the datePoll parameter value as
false
.An event poll is created if the datePoll parameter value is set to
true
.A poll can be created even if you provide the mandatory parameters only. The default values for the optional parameters, if any, are then used.
All mandatory parameters are validated. Depending on the incorrect or missing data, error messages are generated. See Validations.
The response returns code 200 if the poll creation was successful else error messages are generated. See Error codes.
The operation uses basic authentication.
Resource URL
PUT method on <ConfluenceBaseURL>/rest/polls/1.0/poll
ConfluenceBaseURL is the URL of your Confluence instance.
Parameters
See Parameters to learn more about the required and optional parameters of both choice and event polls.
Example request
Example response
Validations
Validation condition | Validated parameter name(s) | Message | Requirement |
---|---|---|---|
If poll name is missing in the request payload | name |
| Poll name is mandatory to create polls. |
If poll options are missing in the request payload |
|
|
|
Data validation |
|
|
|
Error codes
Code | Cause of error | Message displayed |
---|---|---|
412 | Validation errors as mentioned in the above table. See Validations. |
|
403 | User is not permitted to perform a particular operation. | Operation failed with error not allowed. |
401 | Invalid user credentials. | Operation failed with error unauthorized. |