Delete the course
Delete the course,You need to provide SID,safekey,timeStamp,course ID,Returns the description after execution.
If there is a class under the course that has ended or is in session, it cannot be deleted。When there are no classes under the course,You can call End Of The Course。
Note: video files under the course will not be deleted after the course is deleted.If there is a unique identity for the course, it will be deleted together after the course is deleted successfully.
warning: defined as obsolete in V3.2
recommended alternative interfaces:: End Of The Course
URL
https://api.eeo.cn/partner/api/course.api.php?action=delCourse
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 |
Response data
key | Type | Sample value | meaning |
---|---|---|---|
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=delCourse HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: 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=delCourse"
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). |
114 | Expression server exception. |
118 | Expression there is some class on going in the course.(Can't delete). |
147 | Expression no such course information. |
149 | Expression the course has been deleted. |
153 | Expression the course has expired. |
369 | Expression open class does not support this operation. |
393 | Indicates that there is a class that has ended under the course. It cannot be deleted |
822 | Means deleting the course successfully, deleting the unique identity failed |