Create Test Questions
This endpoint allows the creation of questions for tests, receiving the necessary data to configure each question.
Request Example
Section titled “Request Example”curl --request POST \ --url https://kong.api.toolzz.com.br/api/content/avaliation/new_questions \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "school": [123], "theme": "<string>", "group": [1], "subgroup": [2], "specialty": [3], "questions": [ { "support_text": "<string>", "explanation_text": "<string>", "tags": ["<string>"], "difficulty": 1, "question_text": "<string>", "options": [ { "text": "<string>", "is_correct": true } ] } ] }'Response Example
Section titled “Response Example”{ "message": "Questions successfully created"}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
school | array | Array of school IDs where the questions will be linked. | Yes |
theme | string | Theme ID to which the question will be linked. The theme must belong to the same school where the question is being created. | No |
group | array | Name or ID of the group to which the question will be linked. | Yes |
subgroup | array | Name or ID of the subgroup to which the question will be linked. The subgroup must be related to the informed group. | No |
specialty | array | Name or ID of the specialty to which the question will be linked. The specialty must be related to the informed subgroup. | No |
questions | array | List of questions. | Yes |
questions.support_text | string | Support text displayed during the execution of the test. | No |
questions.explanation_text | string | Explanatory text of the answer, displayed after the completion of the test. | No |
questions.tags | array | List of tags associated with the question. | No |
questions.difficulty | number | Question difficulty level: 1 = Easy, 2 = Medium, 3 = Hard. | No |
questions.question_text | string | Question statement. | Yes |
questions.options | array | Question options. | No |
questions.options.text | string | Text of the question alternatives. If this field is empty, the question will be registered as discursive. For multiple choice questions, it is mandatory to send at least two alternatives. | No |
questions.options.is_correct | boolean | Parameter that defines if the alternative is considered correct. false = Incorrect, true = Correct. | No |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
message | string | Message describing the result of the operation. |
Security
Section titled “Security”To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.