Edit Class Information
To edit the class(lesson) information,SID, safekey, timeStamp, course ID, class name, class time, teacher account, teacher name, cloud disk directory ID, recording, live broadcasting, playback, co-teachert, teacher UID, co-teachert UID, etcSID, safeKey, ttimeStamp, courseId, classId are required. Fill in any of the other parameters that need to be modified (edit any of the three parameters: recording, live streaming, playback, and the other two parameters must be filled in,The other two parameters are required.Otherwise, it will not take effect.)To modify the status of the recording of the on-the-spot scene, the three parameters of class cloud recording, website live broadcast and webpage replay are required. Returns the success statement after execution, to change the number of stage calls Edit Students On The Stage In The Class。
Notes:
- Class name, class time, cloud disk resources and number of people on the stage cannot be changed within 20 minutes before class begins.
- If the teacher changes the class during the class, the teacher will quit the class.
- If recording is set for a class (live streaming is not set), more_data returns the live player address for the class, with the pull stream address empty.
- More_data returns the live player address and pull stream address of the lecture if the lecture is recorded and streamed live.
- If you edit or set other parameters and do not change any of the recording/live/call back parameters, return more_data as created.
The co-teacherts have been set up before the class, and cannot be replaced or deleted after the class begins;If no ta is set after class, ta can be added.
More parameter rules are available in Parameter Rules。
URL
https://api.eeo.cn/partner/api/course.api.php?action=editCourseClass
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 |
classId | Yes | Null | Class ID | Null |
className | No | Null | Class name | Null |
beginTime | No | Null | Class time | begin time value = Unix Epoch timeStamp |
endTime | No | If you fill out the beginTime, you must fill in endTime | Break time | end time value = Unix Epoch timeStamp |
teacherUid | No | Null | Teacher's UID | The returned UID from register users |
folderId | No | Default is the school's top-level directory ID | Cloud driver directory ID | Null |
record | No | Default is 0 ,All non-1 Numbers will be treated as 0 | Record the class(0 close,1 open) | Null |
recordScene | No | The default value is 0. All numbers other than 1 will be treated as 0 | Record on-the-spot scene(0 deactivate,1 activate) | Null |
live | No | The default is 0, and all non-1 Numbers will be treated as 0 for | live (0 shutoff, 1 open) | Null |
replay | No | The default is 0, and all non-1 Numbers will be treated as 0 for | playback (0 off, 1 on) | Null |
assistantUid | No | Choose one in assistantUids and assistantUid to pass the parameter.Either not pass this parameter or pass UID. Please do not pass an empty parameter. | co-teachert uid | User's UID returned by calling registered user interface |
assistantUids | No | Choose one in assistantUids and assistantUid to pass the parameter.Either not pass this parameter or pass UID array in JSON and Int. Please do not pass an empty parameter. Can pass just one co-teacher array. | Co-teacher UID array | User's UID returned by calling registered user interface |
isAutoOnstage | No | 0=automatic,1=Don't automatically,Don't fill in,Do not fill, do not modify,Any number that's not a 1, it's treated as a 0 | Whether students enter the classroom automatically | There is no |
classIntroduce | No | 0-1000 words, no distinction between Chinese and English, more than 1000 words will automatically cut into 1000 words | Class introduction | There is no |
watchByLogin | No | No or no, default values are used | Only after logging into ClassIn account is allowed to watch, without logging in cannot watch,0=Did not open,1=open | Two or more items of course record, live and replay are not enabled, and this parameter is not used |
allowUnloggedChat | No | No or no, default values are used | Unlogged users are allowed to participate in live chat and thumb up,0=Don't allow,1=allow | Class record and live are not enabled. This parameter is not used |
Request data
key | Required | More Restrictions | Instructions | Description |
---|---|---|---|---|
more_data | array | [] | Returns an array of Data information | |
└ live_url | string | https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d | Lesson live player address | |
└ live_info | array | [] | Returns an array of Data information | |
└ RTMP | string | "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | The pull flow address for live streaming. | |
└ HLS | string | "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | The pull flow address for live streaming. | |
└ FLV | string | "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | The pull flow address for live streaming. | |
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=editCourseClass HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=2339736&safeKey=58ce17711abea665f40f67d550ce96fb&timeStamp=1493364941&courseId=490583&classId=1395039&className=chinese&beginTime=1493434330&endTime=1493444330&teacherAccount=18503160003&folderId=&record=1&live=1&replay=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 "courseId=442447" \
-d "classId=23644" \
-d "className=测试课程" \
-d "beginTime=1484739085" \
-d "endTime=1484739085" \
-d "teacherUid=1001001" \
-d "folderId=1" \
-d "record=1" \
-d "live=1" \
-d "replay=1" \
-d "assistantUids=[1001002,1001003]" \
"https://api.eeo.cn/partner/api/course.api.php?action=editCourseClass"
Response sample(The normal return json
packet example)
{
"more_data": {
"live_url": "https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d",
"live_info": {
"RTMP": "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"HLS": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"FLV": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd"
}
},
"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. |
119 | The lesson end time must be later than the lesson start time. |
120 | The lesson must start at least one minute after the current time. |
136 | There is no such teacher in your institution. Please add the teacher to your institution first. |
140 | The lesson is still ongoing and cannot be edited or deleted. |
142 | The lesson does not exist in the course. |
143 | No information for this lesson. |
144 | There is no such course in your institution. |
145 | This lesson is finished and cannot be deleted. |
160 | Your institution does not have this directory/folder in its cloud disk. |
165 | The lesson duration shall not be less than 15 minutes and not more than 24 hours. |
172 | Course students cannot be set as teachers when creating lessons. |
173 | Course auditing students cannot be set as teachers when creating lessons. |
212 | The lesson has been deleted. |
268 | The lesson start time exceeds the valid range(The start time must be within 3 years). |
282 | The lesson modified successfully. The recording parameter is incorrect. Thus the recording function is not activated. |
283 | The lesson modified successfully, but failed to modify the recording function. Classroom recording cannot be activated within 20 minutes before the lesson starts. |
284 | The lesson modified successfully. There is problems with the video service, and the recording function is not activated. |
318 | The co-teacher is not a teacher of your institution. |
319 | Course students cannot be set as co-teachers. |
320 | Course auditing students cannot be set as co-teachers. |
321 | Transfer students cannot be set as co-teachers. |
322 | Lesson teachers can't be set as co-teachers. |
323 | Co-teachers failed to purchase lessons. |
324 | The lesson teacher failed to be added to the teacher list. |
325 | Transfer students cannot be set as teachers. |
326 | The co-teacher failed to be added to the teacher list. |
327 | The co-teacher failed to withdraw from the lesson. |
328 | The co-teacher in the lesson cannot be added as the teacher in the same lesson. |
330 | The format of co-teacher's account is incorrect(This error code was removed in April 2022.). |
350 | The lesson name, start time, cloud disk resources and number of students on the stage cannot be modified within 20 minutes before the lesson starts. |
369 | The course/lesson of this type(public course) cannot be operated. |
372 | Failed to modify the function of students auto on stage. |
385 | After the end time of the lesson, you can't modify the teacher or co-teachert. |
387 | The teacher is deactivated. |
388 | The co-teacher is deactivated. |
400 | The requested data is not valid. |
454 | The start and end time of a lesson overlaps with the system maintenance time. |
466 | The lesson was created in the ClassIn LMS and cannot be edited via API. Please edit the lesson in the ClassIn LMS. |
800 | The teacher is suspended. |
804 | The co-teacher is suspended. |
825 | The lesson was edited successfully, and the setting of the lesson introduction failed. |
880 | Failed to modify teaching mode. |
884 | The teacher's account has been deleted by the user. |
885 | The co-teacher's account has been deleted by the user. |
21316 | The data of co-teachers are duplicated. |
21317 | The number of co-teachers exceeds the limit. |
121601001 | There are settings that are not supported by the current version. |
121601002 | Operation successful! The usage limit for [online classroom] resources has been surpassed. To avoid any negative consequences, please reach out to your account manager immediately. |
121601003 | You have exceeded the monthly limit for creating lessons. To continue creating lessons, please upgrade your account to access additional benefits. |
121601004 | You have reached the monthly limit for creating lessons and cannot continue creating more. |
121601005 | Not supported for configuring web-based live streaming. |
121601006 | Not supported for setting up cloud recording for On-the-spot Scene. |
121601007 | Error with the number of people on stage parameter. |
121601008 | Not supported for setting up co-teachers. |
121601009 | Not supported for web-based classroom playback. |
121601010 | Not supported for setting cloud recording. |
121601011 | Not supported for setting dual-camera mode. |
121601012 | Resolution exceeds limit. |