Vote in a poll. The options need to be a list mapping option indices to the vote values (+1, 0, -1). Depending on the voting type not all options need to be included.
PUT
/api/polls/{pollId}/voteAuthorizations
Parameters
Path Parameters
pollId*
Typestring
RequiredRequest Body
JSON
{
"options": {
}
}
Responses
Success
Samples
cURL
curl -X PUT http://localhost/api/polls/{pollId}/vote
JavaScript
fetch("http://localhost/api/polls/{pollId}/vote", { method: "PUT" })
.then(response => response.json())
.then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/polls/{pollId}/vote");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.put("http://localhost/api/polls/{pollId}/vote")
print(response.json())