upsertTrainingQuestion
WRITEUpsert training question.
POST /api/v1/resources/upsertTrainingQuestion
curl -X POST '<your-host>/api/v1/resources/upsertTrainingQuestion' \
-H 'Authorization: Bearer <api-key>' \
-H 'Content-Type: application/json' \
-d '{
"trainingId": "string",
"question": "string",
"type": "MultipleChoice"
}'Response
{
"id": "string"
}Parameters
ParameterType
min length 1
min length 1
"MultipleChoice""TrueFalse""MultipleAnswers""MatchingPairs""Numerical"
min 0
min 0
Input schema
schema
{
"type": "object",
"properties": {
"trainingId": {
"type": "string",
"minLength": 1
},
"question": {
"type": "string",
"minLength": 1
},
"type": {
"type": "string",
"enum": [
"MultipleChoice",
"TrueFalse",
"MultipleAnswers",
"MatchingPairs",
"Numerical"
]
},
"sortOrder": {
"type": "number",
"minimum": 0
},
"required": {
"type": "boolean"
},
"options": {
"type": "array",
"items": {
"type": "string"
}
},
"correctAnswers": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"correctBoolean": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
]
},
"matchingPairs": {
"type": "string"
},
"correctNumber": {
"type": "number"
},
"tolerance": {
"type": "number",
"minimum": 0
},
"id": {
"type": "string"
}
},
"required": [
"trainingId",
"question",
"type"
]
}