Xóa nhiều học sinh/người dự thính khỏi khóa học

Mục lục

Để xóa nhiều học sinh/ người dự thính trong một khóa học, bạn cần truyền các tham số SID, safekey, timeStamp, ID khóa học, tham số xác định vai trò học sinh hay người dự thính (1=học sinh, 2=người dự thính), danh sách tài khoản học sinh hoặc người dự thính cần được xóa khỏi khóa học, student/auditorUID, v.v.

Delete students/audits (multiple) under a course. SID, safekey, timeStamp are required. Provide course ID, student or auditor identification (1 for students, 2 for auditors), and an array of accounts to be deleted, including the accounts to be deleted, student/audit UID, etc. Returns the instructions for each account after execution.

URL

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

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ộcNullID 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
identityBắt buộcXác định vài trò của tài khoản (1=học sinh, 2=người dự thính)
studentUidJsonBắt buộcTối đa được thêm 20 người dự thính cho một khóa họcDanh sách các tài khoản
 └ Student 1 UIDBắt buộcUID của học sinhUID hệ thống trả về khi đăng ký tài khoản thành công, ví dụ: 1001001
 └ Student 2 UIDKhông bắt buộcUID của học sinhUID hệ thống trả về khi đăng ký tài khoản thành công, ví dụ: 1001002
 └ ······Không bắt buộcUID của học sinhUID hệ thống trả về khi đăng ký tài khoản thành công, ví dụ: 1001003

Response Data #

KeyĐịnh dạngPhản hồiÝ nghĩa
dataarray[]Returns an array of data information
└ data return information 1object Return message object
  └ errnonumber1Error code
  └ errorstring“Normal execution”Error list
└ data return information 2object Return message object
  └ errnonumber1Error code
  └ errorstring“Normal execution”Error list
└ ······object Return message object
  └ errnonumber···Error code
  └ errorstring···Error list
error_infoobject Return message object
└ errnonumber1Error code
└ errorstring“Normal execution”Error list

Sample #

  • HTTP Request
POST /partner/api/course.api.php?action=delCourseStudentMultiple HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=b3c832f1b7ae456c38e11320099beecb&timeStamp=1493726325&courseId=490583&identity=1&studentUidJson=["1001001"]
  • 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 "studentUidJson=['1001001']" \
      "https://api.eeo.cn/partner/api/course.api.php?action=delCourseStudentMultiple"

Response Sample(The normal return json packet example) #

{
  "data": [
    {
      "errno": 1,
      "error": "程序正常执行"
    }
  ],
  "error_info": {
    "errno": 1,
    "error": "程序正常执行"
  }
}

Error Code Description #

Error CodeDescription
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
134Số điện thoại không hợp lệ
144Không có khóa học trong trường này
147Không có thông tin về khóa học
153Khóa học đã kết thúc và không thể chỉnh sửa được
155Danh sách học sinh không thể truyền dữ liệu trống
162Không có học sinh này trong khóa học
369Lớp học công khai không cho phép thao tác
400Dữ liệu được yêu cầu không hợp lệ