End course

To end the course, you need to provide SID, safekey, timeStamp, course ID, and return the instructions after execution.Note: if there is no class under the course, you can finish the course.If there are classes under the course that have not yet started, the classes that have not started will be deleted and the course will end. Please use this feature carefully

URL

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

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

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=endCourse HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=1002289&safeKey=9c5cceb65abc66f7d5f5ac5ff212a1ba&timeStamp=1492925596&courseId=1418
  • 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=352855" \
     "https://api.eeo.cn/partner/api/course.api.php?action=endCourse"

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.
144 There is no such course in your institution.
147 No information about this course.
149 The course has been deleted.
153 The course has expired.
369 The course/lesson of this type(public course) cannot be operated.
394 The course has an ongoing lesson. Thus cannot be ended.

results matching ""

    No results matching ""