用户提交答案
POST
https://partyqa.rrrexyz.icu/api/user/project
问答模块
最后修改时间:2025-03-30 11:20:57
请求参数
Body 参数application/json
student_id
string
Student Id
project_uuid
string
Project Uuid
time_used_seconds
string
Time Used Seconds
correct_num
integer
答对题数
user_answers
array [object {2}]
User Answers
question_id
integer
必需
user_answer
string
必需
示例
{
"student_id": "202500993344",
"project_uuid": "b53b6402-0cb1-11f0-beab-38fc98613d7e",
"time_used_seconds": "100.06",
"correct_num": 15,
"user_answers": [
{
"question_id": 1,
"user_answer": "B"
},
{
"question_id": 2,
"user_answer": "ABCD"
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://partyqa.rrrexyz.icu/api/user/project' \
--header 'Content-Type: application/json' \
--data-raw '{
"student_id": "202500993344",
"project_uuid": "b53b6402-0cb1-11f0-beab-38fc98613d7e",
"time_used_seconds": "100.06",
"correct_num": 15,
"user_answers": [
{
"question_id": 1,
"user_answer": "B"
},
{
"question_id": 2,
"user_answer": "ABCD"
}
]
}'
返回响应
🟠422参数错误
application/json
Body
detail
array[object (ValidationError) {3}]
Detail
loc
array [anyOf]
Location
msg
string
Message
type
string
Error Type
示例
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
🟢201成功
🟠400不能重复提交答题
🟠404未设置党支部信息
🟠404项目不存在
修改于 2025-03-30 11:20:57