End course
To end the course, you need to provide SID, safekey, timeStamp, course ID, and return the instructions after execution.Note: if there is no class under the course, you can finish the course.If there are classes under the course that have not yet started, the classes that have not started will be deleted and the course will end. Please use this feature carefully
URL
https://api.eeo.cn/partner/api/course.api.php?action=endCourse
HTTP Request Methods
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 |
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
POST /partner/api/course.api.php?action=endCourse HTTP/1.1
www.eeo.cn
application/x-www-form-urlencoded
no-cache
SID=1002289&safeKey=9c5cceb65abc66f7d5f5ac5ff212a1ba&timeStamp=1492925596&courseId=1418
- 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=352855" \
"https://api.eeo.cn/partner/api/course.api.php?action=endCourse"
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 |
Indicates operation failed (unknown error) |
114 |
Represents a server exception |
144 |
There is no such course under the school |
147 |
Indicates no course information available |
149 |
Indicates that the course has been deleted |
153 |
Indicates that the course has expired |
369 |
The class/session type does not support this operation |
394 |
It means that there is a class under the course |