Skip to content

GET /api/user/current/quizsessions/{quizId}/question

GET
/api/user/current/quizsessions/{quizId}/question

Authorizations

api_key
Type: API Key (header: X-CSRF-Token)

Parameters

Path Parameters

quizId*
Typestring
Required

Query Parameters

isTest
Typeboolean

Responses

Success.
JSON
{
"question": {
"id": 1,
"text": "You are at a store for a pickup. What should you do?",
"durationInSeconds": 60,
"wikilink": "https://wiki.foodsharing.de/some_page",
"failurePoints": 2,
"answers": [
{
"id": 1,
"text": "Take every thing I see with me.",
"explanation": "You should not do that. Obviously.",
"answerRating": null
}
],
"commentCount": 0
},
"questionAge": 10,
"timedOut": true
}
Authorization
api_key
Variables
Key
Value
quizId*
isTest
cURL
curl -X GET \
'http://localhost/api/user/current/quizsessions/{quizId}/question'

Samples

cURL
curl -X GET http://localhost/api/user/current/quizsessions/{quizId}/question
JavaScript
fetch("http://localhost/api/user/current/quizsessions/{quizId}/question")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("http://localhost/api/user/current/quizsessions/{quizId}/question");
Python
import requests
response = requests.get("http://localhost/api/user/current/quizsessions/{quizId}/question")
print(response.json())