Add Class Teacher (API v2)
This interface uses API v2 for adding teachers to a class. Please refer to here for details on API v2 usage.
URL
https://root_url/course/addCourseTeacher
HTTP Request Methods
Request Parameters
| Key |
Required |
Type |
Description |
| X-EEO-SIGN |
Yes |
string |
Signature; rules can be found here |
| X-EEO-UID |
Yes |
string |
Organization SID |
| X-EEO-TS |
Yes |
string |
Timestamp |
Body Parameters
| Key |
Required |
Type |
Description |
Rules Description |
| courseId |
Yes |
integer |
Class (Course) ID |
|
| teacherUids |
Yes |
array[string] |
Array of Teacher UIDs |
Response Parameters
| Parameter Name |
Type |
Example Value |
Meaning |
| code |
integer |
1 |
Error code |
| msg |
string |
"Operation executed successfully" |
Error message |
| data |
array[integer] |
null |
Returned information |
| └ teacherUid |
integer |
|
Returned information |
| └ code |
integer |
1 |
Returned information |
| └ msg |
string |
"Operation executed successfully" |
Returned information |
Example
POST /lms/activity/addStudent HTTP/1.1
root_url
ceb7a2c0534999960c02c191d409c41e
409864
1722938382
application/json
117
{
"courseId": 414193,
"teacherUids": [
504026,
504028
]
}
curl -X POST \
-H 'Host: root_url' \
-H 'X-EEO-SIGN: ceb7a2c0534999960c02c191d409c41e' \
-H 'X-EEO-UID: 409864' \
-H 'X-EEO-TS: 1722938382' \
-H 'Content-Type: application/json' \
-d '{"courseId": 414193, "teacherUids": [504026, 504028]}' \
'https://root_url/course/addCourseTeacher'
Response Example (Normal JSON Data Packet)
{
"code": 1,
"msg": "Operation executed successfully",
"data": [
{
"teacherUid": 504026,
"code": 387,
"msg": "Teacher has been disabled"
},
{
"teacherUid": 504028,
"code": 1,
"msg": "Operation executed successfully"
}
]
}
Error Code Description
| Error Code |
Description |
| 104 |
Operation failed |
| 133 |
Teacher or student already exists |
| 136 |
No teacher under this organization, please add the teacher under the organization |
| 144 |
No such course under the organization |
| 147 |
No information on this course |
| 149 |
This course has been deleted |
| 172 |
Students in the course cannot be added as teachers |
| 173 |
Auditors in the course cannot be added as teachers |
| 387 |
Teacher has been disabled |
| 884 |
Teacher account has been canceled |
| 30031 |
Course has ended |
| 30013 |
Error obtaining organization type |
| 30022 |
This member is already the class leader |
| 101001001 |
Business parameter error |
| 101002005 |
Signature exception |
| 101002006 |
Timestamp expired |
| 101002008 |
Timestamp does not exist |
| 121601020 |
Parameter error |
| 121601021 |
Course does not belong to the current organization |
| 121601022 |
Course is not a standard course |
| 121601030 |
Missing required parameters |