Student are added to the course(single)
Student are added to the course(single),Need SID, safekey, timeStamp, course ID, student and audit identification (1 is students, 2 is auditing), add account number, name to add, etc. Returns the description after execution.
URL
https://api.eeo.cn/partner/api/course.api.php?action=addCourseStudent
HTTP Request Methods
- POST
Coding format
- UTF-8
Request data
key | Required | More Restrictions | Instructions | Description |
---|---|---|---|---|
SID | Yes | Null | School ID | It is available through the eeo.cn application |
safeKey | Yes | Fixed 32-bit all lowercase characters | School authentication security key | safeKey=MD5(SECRET+timeStamp) |
timeStamp | Yes | Null | Imestamp used by safeKey | Unix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970 |
courseId | Yes | Null | Course ID | Null |
identity | Yes | Null | Student and audit identification(1 is student,2 is attend) | Null |
studentName | No | Null | Only take effect when indentity=2 | Null |
studentUid | Yes | Null | student UID | Register the user UID returned by the user interface |
Response data
key | Type | Sample value | meaning |
---|---|---|---|
error_info | object | Return message object | |
└ errno | number | 1 | Error code |
└ error | string | "Normal execution" | Error list |
Sample
- HTTP request
POST /partner/api/course.api.php?action=addCourseStudent HTTP/1.1
Host: www.eeo13.test
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=1002289&safeKey=bd53aabe936c69a85f3d2e329ab8e080&timeStamp=1493030202&courseId=1431&identity=1&studentAccount=18516980114&studentName=Mary
- Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
-d "SID=1234567" \
-d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
-d "timeStamp=1484719085" \
-d "courseId=442447" \
-d "identity=1" \
-d "studentAccount=18511112234" \
-d "studentName=张三" \
"https://api.eeo.cn/partner/api/course.api.php?action=addCourseStudent"
Response sample(The normal return json
packet example)
{
"error_info": {
"errno": 1,
"error": "程序正常执行"
}
}
Error code instruction
Error code | instruction |
---|---|
1 | Expression successful execution. |
100 | Expression parameter not all or error. |
102 | Expression dont have permissions(Security verification failed). |
104 | Expression operation failure(Unknown error). |
113 | Expression mobile phone account is not registered. |
114 | Expression server exception. |
128 | Expression the organization account cannot be added as a student. |
129 | Expression teacher accounts cannot be added to students. |
130 | Expression exceed the number of accounts that can be added. |
134 | Expression cell phone number is illegal. |
144 | Expression there is no such course under the agency. |
147 | Expression no such course information. |
149 | Expression courses have been deleted. |
153 | Expression the course has expired. |
155 | Expression student array can't be empty. |
163 | Expression there are already students on the same phone number. |
164 | Expression in the course, there is an audit of the same phone number. |
174 | Expression the teacher account cannot be added to audit. |
175 | Expression the agency account cannot be added to audit. |
332 | Expression the course teacher or assistant can not be added to the course students or audit. |
333 | Expression the head teacher cannot be added as a course student. |
369 | Expression open class does not support this operation. |