Skip to content

POST /api/user/current/quizsessions/{quizId}/answer

POST
/api/user/current/quizsessions/{quizId}/answer

Authorizations

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

Parameters

Path Parameters

quizId*
Typestring
Required

Query Parameters

isTest
Typeboolean

Request Body

JSON
[
0
]

Responses

Success.
JSON
{
"solution": [
{
"id": 1,
"text": "Take every thing I see with me.",
"explanation": "You should not do that. Obviously.",
"answerRating": null
}
],
"timedOut": true
}
Authorization
api_key
Variables
Key
Value
quizId*
isTest
cURL
curl -X POST \
'http://localhost/api/user/current/quizsessions/{quizId}/answer' \
 --data '[
  0
]'

Samples

cURL
curl -X POST http://localhost/api/user/current/quizsessions/{quizId}/answer
JavaScript
fetch("http://localhost/api/user/current/quizsessions/{quizId}/answer", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://localhost/api/user/current/quizsessions/{quizId}/answer");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("http://localhost/api/user/current/quizsessions/{quizId}/answer")
print(response.json())