URL #
https://root_url/partner/api/course.api.php?action=editCourseGroup
HTTP Request Methods #
- POST
Coding Format #
- UTF-8
Request Parameters #
Key | Bắt buộc | Yêu cầu khác | Hướng dẫn | Mô tả |
---|---|---|---|---|
SID | Bắt buộc | — | ID của trường | Xem dữ liệu này tại Trang quản lý classin.com trong mục API |
safeKey | Bắt buộc | Fixed 32 all lowercase characters | Khóa bảo mật xác thực trường học | safeKey=MD5(SECRET+timeStamp) |
timeStamp | Bắt buộc | — | Theo Unix Epoch timestamp & có hiệu lực trong vòng 20 phút | Thời gian UNIX Epoch là số giây đã trôi qua kể từ 00:00:00 (giờ chuẩn quốc tế) vào ngày 1 tháng 1 năm 1970 |
courseId | Bắt buộc | — | Course ID | — |
groupId | Bắt buộc | — | Group ID | — |
groupList | Bắt buộc | json string | 1. Các trường studentUid và isLeader là bắt buộc phải có dữ liệu. Mỗi nhóm có và chỉ có một trưởng nhóm (isLeader thể hiện đó có phải là trưởng nhóm hay không 1=có; 0=không) 2. Thành viên nhóm không thể lặp lại | [ [{ “studentUid”: 1000152, “isLeader”: 1}, {“studentUid”: 1000109, “isLeader”: 0}], [{“studentUid”: 1000101, “isLeader”: 1}, {“studentUid” : 1000100,”isLeader”: 0}]] |
groupName | Bắt buộc | 1-20 characters, regardless of Chinese or English. If the character exceeds 20, it will be automatically truncated to 20 characters. | Tên phân nhóm | — |
Response Data #
Key | Định dạng | Phản hồi | Ý nghĩa |
---|---|---|---|
error_info | object | Return message object | |
└ errno | number | 1 | Error code |
└ error | string | “Program normal execution” | Error list |
Sample #
- HTTP Request
POST /partner/api/course.api.php?action=editCourseGroup HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=1234567&safeKey=3276433ab0216d9aec2621431cc12248&timeStamp=1494407873&courseId=176465&groupId=139&groupName=课程分组&groupList=[[{"studentUid": 1000152, "isLeader": 1 }, { "studentUid": 1000109, "isLeader": 0}],[{"studentUid": 1000101,"isLeader": 1}, {"studentUid": 1000100,"isLeader": 0}]]
- Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
-d "SID=1234567" \
-d "safeKey=b4bbe6c28f6d6d6536742c2fe0ab41bf" \
-d "timeStamp=1637132493" \
-d "courseId=176465" \
-d "groupId=139" \
-d "groupName=课程分组" \
-d 'groupList= [[{"studentUid": 1000152, "isLeader": 1 }, { "studentUid": 1000109, "isLeader": 0}],[{"studentUid": 1000101,"isLeader": 1}, {"studentUid": 1000100,"isLeader": 0}]]'\
"https://root_url/partner/api/course.api.php?action=editCourseGroup"
Response Sample(The normal return json
packet example) #
{
"error_info": {
"errno": 1,
"error": "程序正常执行"}
}
Notes #
Description of groupList parameter
[
[{
"studentUid": 1000152,
"isLeader": 1
},
{"studentUid": 1000109,
"isLeader": 0
}],
[{
"studentUid": 1000101,
"isLeader": 1
},
{"studentUid": 1000100,
"isLeader": 0
}]
]
1. Paramter of studentUid and isLeader are required, there should be a leader for each team. (isLeader indicates the team leader. 1=Yes 0=No)
2. Team members can not be duplicated
Error Code Description #
Error Code | Description |
---|---|
1 | Thành công |
100 | Parameters sai định dạng hoặc không hoàn chỉnh |
102 | Không có quyền thao tác (Xác thực bảo mật thất bại) |
104 | Thao tác không thành công (lỗi không xác định) |
890 | Thiết lập phân nhóm thất bại |
893 | Thao tác thất bại. Phân nhóm không tồn tại |