GET /api/quiz/{quizId}/questions
GET
/api/quiz/{quizId}/questionsAuthorizations
api_key
Type: API Key (header: X-CSRF-Token)
Parameters
Path Parameters
quizId*
Typestring
RequiredResponses
Success
JSON
{
"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,
"isMandatory": true,
"answers": [
{
"id": 1,
"text": "Take every thing I see with me.",
"explanation": "You should not do that. Obviously.",
"answerRating": null
}
],
"commentCount": 0
}
Authorization
api_key
Variables
Key
Value
quizId*
cURL
curl -X GET \
'http://localhost/api/quiz/{quizId}/questions'
Samples
cURL
curl -X GET http://localhost/api/quiz/{quizId}/questions
JavaScript
fetch("http://localhost/api/quiz/{quizId}/questions")
.then(response => response.json())
.then(data => console.log(data));
PHP
file_get_contents("http://localhost/api/quiz/{quizId}/questions");
Python
import requests
response = requests.get("http://localhost/api/quiz/{quizId}/questions")
print(response.json())