Delete Class
**
Notice: This is one of the Lesson-related interfaces and will no longer be updated after May 26, 2025 (but it can still be used for a while). It is recommended to use the LMS activity interface: Delete Activity
To delete a lesson, you need to pass required parameters, SID, safeKey, timeStamp, course ID and lesson Id. The API responses with error code and the description that you can refer to.
Notes: If you delete the lesson created with courseUniqueIdentity, the courseUniqueIdentity would also be deleted.
URL
https://api.eeo.cn/partner/api/course.api.php?action=delCourseClass
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 |
| classId | Yes | Null | Class 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
- HTTP request
POST /partner/api/course.api.php?action=delCourseClass HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=2339736&safeKey=74522fc7742a006b8bc535d7219a3d2b&timeStamp=1493350512&courseId=490583&classId=1405639
- Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
-d "SID=1234567" \
-d "safeKey=7fe917c22f3afd6ebadd329cfab7d403" \
-d "timeStamp=1492933564" \
-d "courseId=14181" \
-d "classId=23611" \
"https://api.eeo.cn/partner/api/course.api.php?action=delCourseClass"
Response sample(The normal return json packet example)
{
"error_info": {
"errno": 1,
"error": "程序正常执行"
}
}
Error Code Description
| Error Code | Description |
|---|---|
| 1 | Successful execution. |
| 100 | Incomplete or incorrect parameters. |
| 102 | No permission(security verification failed). |
| 104 | Operation failed(unknown error). |
| 114 | Server exception. |
| 140 | The lesson is still ongoing and cannot be edited or deleted. |
| 142 | The lesson does not exist in the course. |
| 143 | No information about the lesson. |
| 144 | There is no such course in your institution. |
| 145 | This lesson is finished and cannot be deleted. |
| 212 | This lesson has been deleted. |
| 369 | The course/lesson of this type(public course) cannot be operated. |
| 466 | The lesson was created in the ClassIn LMS and cannot be edited via API. Please edit the lesson in the ClassIn LMS. |
| 823 | The lesson is deleted successfully. Failed to delete the courseUniqueIdentity. |