Skip to content

Read poll results

Read how many times each option was chosen, so your application can display live results without downloading individual responses.

GET /api/v1/tests/{test_key}/results

Field Type Required Meaning
test_key (path) string Yes The test’s key
Terminal window
curl --fail-with-body \
'https://app.redjade.net/api/v1/tests/community-poll/results' \
--header "Authorization: Bearer $REDJADE_TOKEN"
GET /api/v1/tests/community-poll/results
{
"context": {
"test": { "key": "community-poll", "name": "Community poll" }
},
"questionnaires": [
{
"key": "purchase-poll",
"name": "Purchase intent",
"participants": 120,
"repetitions": 120,
"questions": [
{
"key": "purchase-intent",
"type": "choice",
"exclusive": true,
"text": "Would you buy this product?",
"answered": 120,
"options": [
{ "key": "yes", "name": "Yes", "count": 78, "percent": 65.0 },
{ "key": "no", "name": "No", "count": 42, "percent": 35.0 }
]
}
]
}
]
}

To receive the same results in the response to a vote, add include=results when you send the response.

Field Type Meaning
questionnaires[].participants integer Number of different participants with at least one repetition
questionnaires[].repetitions integer Number of repetitions
questions[].answered integer Number of repetitions with a response to this question
options[].count integer Number of repetitions that selected the option
options[].percent number or null count divided by answered, times 100, to one decimal place. null when answered is zero.

Every option of the question appears, including options with a count of zero.

  • Each repetition counts once. A member who votes with two repetition keys counts twice in repetitions and once in participants.
  • A replaced repetition counts with its current response. Changing a vote moves the count from one option to the other.
  • A repetition in which the question was not presented or not answered is left out of answered.
  • On a question that is not exclusive, a repetition counts toward every option it selected. The percentages can add up to more than 100.

The results reflect every request RedJade has accepted, including one that returned a moment earlier.

Results cover choice questions. Other question types do not appear in questions. Read individual responses with Read responses and definitions or Download study data.