Thiết lập khóa bảo vệ

Mục lục

Modify class lock status.you need send SID,safekey,timeStamp,classID. All classes are unlocked by default。If the class is changed to the locked state after the function of automatic deletion of video recording and pictures of supervised classes is enabled in the background of eeo.cn, the video recording and pictures of supervised classes will not be automatically deleted.

URL #

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

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útUnix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970
classIdBắt buộcID lớp học (lesson)
isLockBắt buộc0=Tắt,1=Bật
Tất cả các tham số khác 1 đều được hiểu là 0
Thiết lập trạng thái khóa bảo vệ

 

Response data #

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

Sample #

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

SID=2339736&safeKey=4c375898926f24ad991099df67ebef92&timeStamp=1493729726&classId=1395037&isLock=1
  • 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 "classId=9876" \
        -d "isLock=1" \
    "https://api.eeo.cn/partner/api/course.api.php?action=updateClassLockStatus"

Response sample(The normal return json packet example) #

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

Error code instruction #

Error codeInstruction
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
233Không có lớp học này trong trường
369Lớp học công khai không hỗ trợ điều chỉnh
391Lớp học chưa hoàn thành không hỗ trợ chỉnh trạng thái khóa bảo vệ