提交答案
POST
/api/answer
前台用户端
最后修改时间:2025-01-25 09:15:39
责任人:未设置
1.
status=1
)2.
3.
请求参数
Body 参数application/json
project_uuid
string
Project Uuid
user_answer
array[integer]
User Answer
示例
{
"project_uuid": "1820380e-22d0-4f68-97ed-bd49f563100b",
"user_answer": [
2,
1,
4,
3,
2
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/answer' \
--header 'Content-Type: application/json' \
--data-raw '{
"project_uuid": "1820380e-22d0-4f68-97ed-bd49f563100b",
"user_answer": [
2,
1,
4,
3,
2
]
}'
返回响应
🟢200返回用户作答结果信息
application/json
Body
project_uuid
string <uuid>
Project Uuid
user_uuid
string <uuid>
User Uuid
user_answer
array[integer]
User Answer
correct_answer
array[integer]
Correct Answer
user_correct_num
integer
User Correct Num
total_item_num
integer
Total Item Num
correct_rate
number
Correct Rate
示例
{
"correct_answer": [
2,
1,
3,
3,
2
],
"correct_rate": 0.8,
"project_uuid": "1820380e-22d0-4f68-97ed-bd49f563100b",
"total_item_num": 5,
"user_answer": [
2,
1,
4,
3,
2
],
"user_correct_num": 4,
"user_uuid": "2fcfa550-d93b-11ef-a2a9-832c32728689"
}
🟠404项目不存在
🟠422Validation Error
修改于 2025-01-25 09:15:39