Vote
Vote Service
Web service endpoints for votes on polls.
Jump to
Create Vote
POST /votes/{contentID}Cast a vote on the specified poll. Some polls allow multiple votes or a single vote.
Path Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| contentID | String | true | ID of the poll for which to cast a vote |
Takes:
Return Status:
| HTTP Status Code | Description |
|---|---|
| 201 (Created) | Request was successful |
| 400 (Bad Request) | If any input field is malformed, or the ID does not specify a poll |
| 403 (Forbidden) | If you are not allowed to perform this operation |
| 404 (Not Found) | If the specified poll does not exist |
Get Votes
GET /votes/{contentID}Return the number of votes cast for each poll option.
Path Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| contentID | String | true | ID of the poll for which to retrieve votes |
Retrieves:
Return Status:
| HTTP Status Code | Description |
|---|---|
| 200 (OK) | Request was successful |
| 400 (Bad Request) | An input field is missing or malformed |
| 403 (Forbidden) | You are not allowed to access the specified poll |
| 404 (Not Found) | The specified poll does not exist |