List generated questions
返回已生成的题目列表。
生成任务是异步的,你可以通过任务查询接口轮询任务状态,当状态变更为 succeeded
后,通过本接口获取生成的题目。
当生成任务状态不为 succeeded
时,调用本接口也可能会返回部分题目,此时任务出于部分完成状态,返回的题目会低于预期数量。
题目格式说明:
{
"object": "question",
// 题目类型
"type": "single_choice",
// 题干
"label": "激光全息防伪技术的主要特点是?",
// 选项
"choices": [
{
"value": "A",
"name": "重量很轻"
},
{
"value": "B",
"name": "成本低廉"
},
{
"value": "C",
"name": "图案清晰且难以复制"
},
{
"value": "D",
"name": "可以重复使用"
}
],
// 正确答案, 数组
"correct_answers": ["C"],
// 答案解析
"explanation": "激光全息防伪技术通过图案的复杂性和清晰度实现防伪,是难以复制的。"
}
Path parameters
-
Format should match the following pattern:
^gen-
.
GET /generations/{id}/questions
curl \
-X GET https://v5.jinshuju.net/exam/api/generations/{id}/questions
Response examples (200)
{
"data": [
{
"type": "single_choice",
"label": "激光全息防伪技术的主要特点是?",
"object": "question",
"choices": [
{
"name": "重量很轻",
"value": "A"
},
{
"name": "成本低廉",
"value": "B"
},
{
"name": "图案清晰且难以复制",
"value": "C"
},
{
"name": "可以重复使用",
"value": "D"
}
],
"explanation": "激光全息防伪技术通过图案的复杂性和清晰度实现防伪,是难以复制的。",
"correct_answers": [
"C"
]
},
{
"type": "multiple_choice",
"label": "RFID技术的应用可以包括哪些功能?",
"object": "question",
"choices": [
{
"name": "库存管理",
"value": "A"
},
{
"name": "防盗报警",
"value": "B"
},
{
"name": "环境监测",
"value": "C"
},
{
"name": "化学防伪",
"value": "D"
}
],
"explanation": "RFID技术在防伪中的应用包括库存管理和防盗报警。",
"correct_answers": [
"A",
"B"
]
},
{
"type": "true_or_false",
"label": "全息防伪技术利用的是光的衍射原理。",
"object": "question",
"choices": [
{
"name": "对",
"value": "A"
},
{
"name": "错",
"value": "B"
}
],
"explanation": "全息防伪技术通过光的衍射和干涉来显示三维图像。",
"correct_answers": []
}
],
"object": "list"
}
Response examples (404)
{
"error": {
"type": "invalid_request_error",
"message": "No such Generation object: invalid"
}
}