Chỉnh sửa thông tin Giáo viên

Mục lục

Edit teacher,You need the SID, safekey, timeStamp, the UID for the teacher and the school, the name of the teacher, and the photo of the teacher, with the type of head in the binary stream type. Returns the description after execution.

URL #

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

HTTP Request Methods #

  • POST

Coding format #

  • UTF-8

Request data #

keyRequiredMore RestrictionsInstructionsDescription
SIDYesNullSchool IDIt is available through the eeo.cn application
safeKeyYesFixed 32-bit all lowercase charactersSchool authentication security keysafeKey=MD5(SECRET+timeStamp)
timeStampYesNullimestamp used by safeKeyUnix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970
teacherUidYesteacherUidteacher’s UIDUse Register interface to get UID
teacherNameYesNullteacher nameNull
FiledataNoBinary streamTeacher’s pictureNull

Response data #

keyTypeSample valuemeaning
error_infoobjectReturn message object
└ errnonumber1The error code
└ errorstring“Normal execution”Error list

Sample #

  • HTTP request
POST /partner/api/course.api.php?action=editTeacher HTTP/1.1
Host: root_url
Content-Type: multipart/form-data
Cache-Control: no-cache

SID=2339736&safeKey=51cf7854e932de0df9f37fa7dcbf463c&timeStamp=1492871773&teacherUid=16615&teacherName=&Filedata=
  • Shell cURL analog request instruction
curl -H "Content-Type: multipart/form-data" -X "POST" \
    -d "SID=1234567" \
    -d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
    -d "timeStamp=1484719085" \
    -d "teacherUid=14165" \
    -d "teacherName=dan" \
    "https://api.eeo.cn/partner/api/course.api.php?action=editTeacher"

Response sample(The normal return json packet example) #

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

Error Code Description #

Error CodeDescription
1Successful execution.
100Incomplete or incorrect parameters.
102Don’t have permissions(Security verification failed).
103Failed to upload the image to the server.
104Operation failed (unknown error).
219Teacher information does not exist.