Xóa lớp học

Mục lục

Để xóa một lớp học, bạn cần truyền các tham số SID, safeKey, timeStamp, course ID and lesson Id.

Lưu ý: Nếu bạn truyền tham số courseUniqueIdentity khi tạo lớp học [Tạo lớphọc (Single lesson) hoặc Tạo nhiều lớp học cùng lúc (Multiple lessons)], dữ liệu courseUniqueIdentity sẽ bị xóa sau khi lệnh được gọi thành công.

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.

Note: If you passed the courseUniqueIdentity when creating a lesson [Create Lesson (Single) or Create Lessons (Multiple)], the courseUniqueIdentity will be deleted after the lesson is successfully deleted.

URL

 

https://api.eeo.cn/partner/api/course.api.php?action=delCourseClass

HTTP Request Methods  #

  • POST

Coding format #

  • UTF-8

Request data #

KeyBắt buộcYêu cầu thêmMô tảHướng dẫn
SIDBắt buộcID của trườngXem dữ liệu này tại Trang quản lý classin.com trong mục API
safeKeyBắt buộcFixed 32-bit all lowercase charactersKhóa bảo mật xác thực trường họcsafeKey=MD5(SECRET+timeStamp)
timeStampBắt buộcTheo Unix Epoch timestamp & có hiệu lực trong vòng 20 phútThời gian UNIX Epoch là số giây đã trôi qua kể từ 00:00:00 (giờ chuẩn quốc tế) vào ngày 1 tháng 1 năm 1970
courseIdBắt buộcID Khóa học
classIdBắt buộcID lớp học

Response data #

KeyĐịnh dạngPhản hồiÝ nghĩa
error_infoobject Return message object
└ errnonumber1Mã lỗi
└ errorstring“Normal execution”Chi tiết lỗi

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 CodeMô tả
1Thành công
100Parameters sai định dạng hoặc không hoàn chỉnh
102Không có quyền thao tác (Xác thực bảo mật thất bại)
104Thao tác thất bại
114Lỗi server
140Lớp học đang diễn ra không thể được điều chỉnh hay xóa
142Lớp học không tồn tại trong khóa học này
143Không có thông tin của lớp học
144Không có thông tin của khóa học này trong trường
145Lớp học đã kết thúc và không thể bị xóa
212Lớp học này đã bị xóa
369Lớp học công khai không hỗ trợ điều chỉnh
466Lớp học được tạo từ LMS không thể chỉnh sửa thông qua API. Vui lòng truy cập ứng dụng ClassIn hoặc Trang quản lý để chỉnh sửa
823Lớp học đã được xóa thành công. Nhưng không thể xóa courseUniqueIdentity