List polls
GET
/cms/poll
const url = 'https://api.example.com/cms/poll';const options = {method: 'GET', headers: {'API-Key': '<API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.example.com/cms/poll \ --header 'API-Key: <API-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”page
integer
limit
integer
Responses
Section titled “Responses”List of polls
Media typeapplication/json
Array<object>
PollAPI representation of a poll
object
id
Poll ID
integer format: int64
timestamp
Timestamp
string
question
Question
string
choices
Choices
Array<string>
votes
Votes
integer
slug
Slug
string
category
PollCategory
API representation of a poll category
object
id
Category ID
integer format: int64
name
Name
string
image
Image
string
results
Results
Array<object>
object
value
Number of votes
integer format: int64
percentage
Percentage of total votes
number format: float
message
Message
string
onlyLoggedIn
Only logged in
integer
endDate
End date
string
voted
Voted (only true when voting)
boolean
voted_choice
Voted choice (only valid when voting)
integer
closed
Closed
integer
Example generated
[ { "id": 1, "timestamp": "example", "question": "example", "choices": [ "example" ], "votes": 1, "slug": "example", "category": { "id": 1, "name": "example" }, "image": "example", "results": [ { "value": 1, "percentage": 1 } ], "message": "example", "onlyLoggedIn": 1, "endDate": "example", "voted": true, "voted_choice": 1, "closed": 1 }]