### HTTP Request Example Source: https://docs.eeo.cn/api/en/LMS/releaseActivity.html Example HTTP POST request to publish an activity. Includes required headers and JSON body with courseId and activityId. ```http POST /lms/activity/release HTTP/1.1 Host: root_url X-EEO-SIGN: fe19eb3a5b721c7b66194e4a29ee8ead X-EEO-UID: 409864 X-EEO-TS: 1722938255 Content-Type: application/json Content-Length: 84 { "courseId": 414193, "activityId": 25096096 } ``` -------------------------------- ### String to be Signed Example Source: https://docs.eeo.cn/api/en/appendix/signature.html The string to be signed after sorting parameters and appending the secret key. This is the result of the example request. ```text courseId=132323&sid=1000082&timeStamp=1673949471&key=Mb71234 ``` -------------------------------- ### Client page wake-up link example Source: https://docs.eeo.cn/api/en/getLoginLinked.html Example invocation link that wakes the ClassIn client for the specified account. Append all parameters from the original link to the domain name address. ```text https://www.eeo.cn/client/invoke/index.html?telephone=001-8006437676&classId=1213545&courseId=394761&schoolId=1009478 ``` -------------------------------- ### Response Example Source: https://docs.eeo.cn/api/en/classroom/addCourseTeacher.html Example JSON response showing per-teacher results. Note that one teacher may fail with an error code while others succeed. ```json { "code": 1, "msg": "Operation executed successfully", "data": [ { "teacherUid": 504026, "code": 387, "msg": "Teacher has been disabled" }, { "teacherUid": 504028, "code": 1, "msg": "Operation executed successfully" } ] } ``` -------------------------------- ### HTTP Request Example Source: https://docs.eeo.cn/api/en/LMS/addStudent.html Example HTTP POST request to add students to an activity. Includes headers and JSON body with courseId, activityId, and studentUids. ```http POST /lms/activity/addStudent HTTP/1.1 Host: root_url X-EEO-SIGN: ceb7a2c0534999960c02c191d409c41e X-EEO-UID: 409864 X-EEO-TS: 1722938382 Content-Type: application/json Content-Length: 117 { "courseId": 414193, "activityId": 25096097, "studentUids": [ 504026, 504028 ] } ``` -------------------------------- ### HTTP Request Example Source: https://docs.eeo.cn/api/en/classroom/addCourseTeacher.html Example HTTP request to add teachers to a course. The request includes required headers and a JSON body with courseId and teacherUids. ```http POST /lms/activity/addStudent HTTP/1.1 Host: root_url X-EEO-SIGN: ceb7a2c0534999960c02c191d409c41e X-EEO-UID: 409864 X-EEO-TS: 1722938382 Content-Type: application/json Content-Length: 117 { "courseId": 414193, "teacherUids": [ 504026, 504028 ] } ``` -------------------------------- ### Check command example JSON Source: https://docs.eeo.cn/api/en/datasub/details.html Example JSON payload for the 'Check' command, showing device detection results including camera, microphone, and speaker details. ```json { "ClassID": 290274, "ActionTime": 1521547218, "UID": 1001920, "CourseID": 122982, "TimeStamp": 1521547219, "Cmd": "Check", "_id": "5ab0f7d2a3251e6e49b9e88b", "SID": 1001920, "SafeKey": "7e0a589d8fd68a82a523ac86c95c9d1d", "Data": { "MicrophoneArbitrary": null, "ClassInVersion": "2.1.1.60", "EEO_AUDIO_OUTPUT_NAME": "\u626c\u58f0\u5668 (Realtek High Definition Au", "FrameLoss": "", "EEO_AUDIO_DEVICE_NAME": "\u9ea6\u514b\u98ce (HD Webcam C270)", "CameraImpersonal": 0, "addTime": 1521547218, "CPU": "Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz", "OperatingSystem": "Windows 10 (1709)", "Mac": "00:15:5D:33:74:C4", "CameraArbitrary": null, "EEO_VIDEO_DEVICE_NAME": "Logitech HD Webcam C270", "ServerName": "EEO-A0134 (Auto)", "HeadphoneAttachment": "", "ClientIP": "10.0.1.*", "MicrophoneAttachment": "https://root_url/upload/autocheck/", "EEO_DEVICE_LIST": "{\"camera\": [\"Logitech HD Webcam C270\"], \"micphone\": [\"HD Webcam C270\"], \"speaker\": [\"LG HDR 4K\"]}", "MicrophoneImpersonal": 0, "CameraAttachment": "", "HeadphoneArbitrary": null, "InfoSource": 3, "NetworkDelay": "" } } ``` -------------------------------- ### LiveDetail message example Source: https://docs.eeo.cn/api/en/datasub/details.html Example payload for the LiveDetail message. Sent each time the teacher enters the virtual classroom and starts the classroom recording. Contains the cloud recording settings such as audio mode, bitrate, IP, microphone recording, video scope, and video size. ```json { "SID": 1001920, "Data": { "Audio mode": "ClassIn Audio", "HighBitRate": "Standard", "IP": "livepush.eeo.cn", "Micphone is recorded": "Yes", "Video Scope": "Desktop", "Video Size": "HD(1280*720)" }, "ClassID": 392429, "Cmd": "LiveDetail" } ``` -------------------------------- ### POST /partner/api/course.api.php?action=register Source: https://docs.eeo.cn/api/en/user/register.html Registers a new user with the provided phone number, password, and optional avatar. Returns the new user's UID on success. ```APIDOC ## POST /partner/api/course.api.php?action=register ### Description Registers a new user with the provided phone number, password, and optional avatar. Returns the new user's UID on success. ### Method POST ### Endpoint /partner/api/course.api.php?action=register ### Parameters #### Request Body (application/x-www-form-urlencoded) - **SID** (string) - Required - The institution ID. - **safeKey** (string) - Required - Security key for authentication. - **timeStamp** (number) - Required - Unix timestamp of the request. - **telephone** (string) - Required - The user's phone number. - **password** (string) - Required - The user's password (6-20 digits). - **Filedata** (file) - Optional - The user's avatar image file. ### Request Example ``` POST /partner/api/course.api.php?action=register HTTP/1.1 Host: root_url Content-Type: application/x-www-form-urlencoded Cache-Control: no-cache SID=2339736&safeKey=3276433ab0216d9aec2621431cc12248&timeStamp=1494407873&telephone=001-8006437676&password=123456&Filedata=@~/photo.jpg ``` ### Response #### Success Response (200) - **data** (number) - The registered user ID (UID). - **error_info** (object) - Return message object. - **errno** (number) - The error code. - **error** (string) - Error details. #### Response Example ``` { "data": 1001930, "error_info": { "errno": "1", "error": "程序正常执行/Normal execution" } } ``` ### Error Codes | Error Code | Instruction | |---|---| | 1 | Successful execution. | | 100 | Incomplete or incorrect parameters. | | 102 | Don't have permissions(Security verification failed). | | 114 | Server exception. | | 131 | Registration failure. | | 134 | Illegal mobile phone number. | | 135 | The mobile phone number has been registered(UID will be returned at the same time). | | 137 | Illegal password length(6-20 digits). | | 224 | Type of picture uploaded is wrong. | | 288 | The mobile phone number segment is invalid. | | 340 | Registration succeeded, user avatar setting failed. | | 341 | Uploaded picture size error (300 * 300). | | 342 | Uploaded picture exceeded the limit (1M). | | 461 | The email has been registered ( UID will be returned at the same time). | | 820 | The registration was successful, but failed to add as an institution student. | | 821 | The registration was successful, but failed to add as an institution teacher. | | 845 | Exceeded the maximum number of enabled teachers in the institution. | | 101003002 | Duplicate request. | ``` -------------------------------- ### ReplayDataDetail message example Source: https://docs.eeo.cn/api/en/datasub/classrelated.html Example message for the 'ReplayDataDetail' command, sent when a user closes the lesson playback webpage on the ClassIn webpage. The Data object includes Telephone (actual login account or a string starting with 'yk_' if not logged in), Nickname, Intime (Unix timestamp when entering the live page), LookTime (viewing duration in seconds), IP, and ClientType (1-PC browser, 2-mobile browser, 3-WeChat mini program). ```json { "SID": 100088, "ClassID": 10086, "Cmd": "ReplayDataDetail", "Data": { "Telephone": "15201114553", "Nickname": "husky2021", "Intime": 1625108250, "LookTime": 60, "Ip": "127.0.0.1", "ClientType": 1 } } ``` -------------------------------- ### Start time timestamp Source: https://docs.eeo.cn/api/en/datasub/classrelated.html A JSON key-value pair indicating a start time as a Unix timestamp. ```json "StartTime" : 1594868093 ``` -------------------------------- ### POST setClassVideoMultiple Source: https://docs.eeo.cn/api/en/broadcast/setClassVideoMultiple.html Sets up video, live, and return settings for multiple classes. Requires authentication parameters and class information array. Modifies recording, live broadcast, and playback statuses. ```APIDOC ## [POST] https://api.eeo.cn/partner/api/course.api.php?action=setClassVideoMultiple ### Description Sets up cloud recording, website live broadcast, and webpage replay for multiple classes. Modify any of the three parameters (recording, live broadcast, playback) and fill in the other two. To modify the recording status of the on-the-spot scene, all three parameters are required. If the current session has ended, recording and live broadcasting cannot be set. Custom fields can be passed and are returned as-is. ### Method POST ### Endpoint https://api.eeo.cn/partner/api/course.api.php?action=setClassVideoMultiple ### Parameters #### Query Parameters - **action** (string) - Required - The API action, must be `setClassVideoMultiple`. #### Request Body - **SID** (string) - Required - Partner's SID. - **safekey** (string) - Required - Security key for authentication. - **timeStamp** (string) - Required - Timestamp of the request. - **course ID** (string) - Required - The course identifier. - **class information array** (array) - Required - Array of class information objects. Each object includes class ID, recording, live broadcasting, and playback. ### Request Example { "SID": "your_sid", "safekey": "your_safekey", "timeStamp": "timestamp", "courseId": "course_id", "classList": [ { "classId": "class_id_1", "record": 1, "live": 1, "playback": 1 } ] } ### Response #### Success Response (200) - **more_data** (object) - Contains live streaming player address and pull stream address depending on settings. #### Response Example json { "more_data": { "live_player_url": "https://example.com/player", "pull_stream_url": "" } } ### Notes - If class recording is set (live streaming is not set), more_data returns the live streaming player address of the class, and the pull stream address is empty. - If the lecture is recorded and streamed live, more_data returns the live player address and pull stream address. - To enable the recording of the on-the-spot scene, please turn on the record function first, otherwise, the recording of the on-the-spot scene is not available. ``` -------------------------------- ### DualTeacherClicker message example Source: https://docs.eeo.cn/api/en/datasub/details.html Example payload for the DualTeacherClicker message. Shows the expected fields and structure, including nested AnswerDetails with per-student answers and grading results. Note that CorrectionResult is shown as a string in the example, while the table describes it as an Int64. ```json { "Cmd": "DualTeacherClicker", "SID": 100082, "MainClassId": 8222519, "TeacherUid": 279203, "AnswerMachineId": 3451, "Options": "A,B,C,D", "Answer": "B,C", "CreateTime": 1724317467, "EndTime": 1724317495, "ClassId": 8222519, "AnswerDetails": [ { "StudentUid": 299869, "StudentAnswer": "B,C", "Duration": 18, "CorrectionResult": "1" }, { "StudentUid": 100083, "StudentAnswer": "C", "Duration": 20, "CorrectionResult": "2" } ] } ``` -------------------------------- ### POST /partner/api/course.api.php?action=addCourse Source: https://docs.eeo.cn/api/en/classroom/addCourse.html Adds a new course to the eeo.cn platform. Requires authentication via SID, safeKey, and timeStamp. ```APIDOC ## [POST] /partner/api/course.api.php?action=addCourse ### Description Adds a new course to the eeo.cn platform. Requires authentication via SID, safeKey, and timeStamp. ### Method POST ### Endpoint https://api.eeo.cn/partner/api/course.api.php?action=addCourse ### Parameters #### Request Body - **SID** (string) - Required - School ID, available through the eeo.cn application - **safeKey** (string) - Required - Fixed 32-bit all lowercase characters, school authentication security key, safeKey=MD5(SECRET+timeStamp) - **timeStamp** (string) - Required - Timestamp used by safeKey, Unix Epoch timeStamp (seconds since 1970-01-01) - **courseName** (string) - Required - Course name - **folderId** (string) - Optional - Available resource folder ID, default empty directory if not passed - **Filedata** (binary) - Optional - Cover of the course - **expiryTime** (integer) - Optional - Expiration time as Unix Epoch timeStamp. If not passed or 0, course never expires. If set, must be within 5 years of current time. Expiration time extended to 3 months later when a new class is created and expiry is within 3 months. - **courseIntroduce** (string) - Optional - Course introduction, can be null, length 0-400 words - **classroomSettingId** (integer) - Optional - Default 0. Classroom setting ID, found in eeo.cn admin dashboard under institutional settings and classroom settings. - **courseUniqueIdentity** (string) - Optional - Unique identifier, 1-32 characters, non-conforming values return 100 error - **mainTeacherUid** (string) - Optional - Headteacher's UID, registered user UID returned by user interface. If not passed or empty, no headteacher. - **subjectId** (integer) - Optional - Course subject, only valid for School Dashboard courses. Values: 1: Chinese, 2: Maths, 3: English, 4: Physics, 5: Chemistry, 6: Biology, 7: Politics, 8: History, 9: Geography, 10: Ideological and Moral Education, 11: Music, 12: PE, 13: Arts, 14: General Technology, 15: IT, 16: Science, 99: Others. Default 0 if not passed or invalid. - **catId** (integer) - Optional - Course organizational structure ID, only valid for School Dashboard courses. - **allowAddFriend** (integer) - Optional - Whether to allow class members to add friends in course group, 0=not allow, 1=allow. Must be 0 or 1, otherwise error. Default from admin dashboard. - **allowStudentModifyNickname** (integer) - Optional - Whether students can modify class nicknames, 0=not allow, 1=allow. Must be 0 or 1, otherwise parameter error. Default 0. - **notAllowDeleteCourseStudentReplay** (integer) - Optional - Whether to disallow students who left course from viewing content or prevent access after course dismissed. 0=No(allow), 1=Yes(disallow). If not passed, setting not modified; if passed incorrectly, parameter error. - **allowInitiativeJoin** (integer) - Optional - Allow students to proactively join class, 0=not allowed, 1=allowed. Default 0. - **inviteState** (integer) - Optional - Whether to show join class entry on shared webpage, only effective when allowInitiativeJoin=1. Default 0. - **allowTeacherAddFriend** (integer) - Optional - Allow headteacher to add class members as friends, 0=not allowed, 1=allowed. Uses institution config if not passed. - **allowCourseNotice** (integer) - Optional - Allow displaying class updates, 0=not allowed, 1=allowed. Uses institution config if not passed. - **allowTeacherCreateCourse** (integer) - Optional - Allow teachers to start temporary classrooms, 0=not allowed, 1=allowed. Uses institution config if not passed. ### Request Example ``` POST /partner/api/course.api.php?action=addCourse Content-Type: application/x-www-form-urlencoded SID=your_school_id&safeKey=your_safe_key&timeStamp=your_timestamp&courseName=Math101 ``` ### Response #### Success Response (200) No response schema provided in the source. #### Response Example No response example provided in the source. ``` -------------------------------- ### LiveLike event example Source: https://docs.eeo.cn/api/en/datasub/details.html Example payload for the LiveLike event, sent in realtime when a viewer clicks LIKE on the ClassIn web-live page. ```json { "SID": 100088, "ClassID": 10086, "Cmd": "LiveLike", "Data": { "Telephone": "15201114553", "Time": 1625108250 } } ``` -------------------------------- ### Response Sample Source: https://docs.eeo.cn/api/en/LMS/addStudent.html Example JSON response showing the result of adding students. Includes per-student codes and messages. ```json { "code": 1, "msg": "Execution successful", "data": [ { "studentUid": 504026, "code": 40030, "msg": "Student not in the class" }, { "studentUid": 504028, "code": 1, "msg": "Execution successful" } ] } ``` -------------------------------- ### Example Request for setWebcast API Source: https://docs.eeo.cn/api/en/broadcast/setWebcast.html Sends a POST request to the setWebcast endpoint with required headers and a JSON body containing courseId, activityId, and live streaming settings. ```bash curl --location --request POST 'https://{root_url}/lms/activity/setWebcast' \ --header 'X-EEO-SIGN: {{sign}}' \ --header 'X-EEO-UID: {{UID}}' \ --header 'X-EEO-TS: {{timeStamp}}' \ --header 'Content-Type: application/json' \ --data-raw '{ "courseId": 414193, "activityId": 25096094, "recordState": 1, "recordType": 0, "liveState": 1, "openState": 1, "watchByLogin": 0, "webcastIntroduce": "Course introduction for this live session" }' ``` -------------------------------- ### POST /partner/api/course.api.php?action=register Source: https://docs.eeo.cn/api/en/user/register.html Registers a new user (teacher or student) using telephone or email. Requires authentication via SID, safeKey, and timeStamp. Supports optional nickname, avatar upload, and adding the user as a school member. ```APIDOC ## [POST] /partner/api/course.api.php?action=register ### Description Registers a new user (teacher or student) using telephone or email. Requires authentication via SID, safeKey, and timeStamp. Supports optional nickname, avatar upload, and adding the user as a school member. ### Method POST ### Endpoint `https://api.eeo.cn/partner/api/course.api.php?action=register` ### Parameters #### Request Body - **SID** (string) - Required - School ID. It is available through the eeo.cn application. - **safeKey** (string) - Required - Fixed 32-bit all lowercase characters. School authentication security key. Format: `safeKey=MD5(SECRET+timeStamp)`. - **timeStamp** (string) - Required - The Unix Epoch timestamp should be within 20 minutes of the current API call time. UNIX Epoch timestamp is the number of seconds elapsed since 00:00:00 (world standard time) on January 1, 1970. - **telephone** (string) - Required (Either telephone or email) - Format: `00 Country code-Mobile phone number`. For Mainland China, do not input the country number, and the first number of phone number can't be 0. Example: For American mobile phone number, like 1 (800) 643-7676, please send `001-8006437676`. For China Mainland mobile phone numbers, please send in the format of `13701237634`. - **email** (string) - Required (Either telephone or email) - Email address. - **nickname** (string) - Optional - The maximum length is 24 characters. If it exceeds 24 characters, it will be automatically truncated to 24 characters. If this parameter is passed, it will be used as the nickname of the teacher or student and displayed on the client. If the nickname is not passed, the mobile phone number will be used as the nickname of the teacher or student. When the user logs in to the client, a window will pop up for the user to fill in the nickname. The nickname is displayed under the user's camera in the virtual classroom, with a maximum of 24 characters. - **password** (string) - Required (Either password or md5pass) - Clear-text passwords. The number of digits of the password shall not be less than 6 and not more than 20. If it does not meet the requirements, an error will be reported. - **md5pass** (string) - Required (Either password or md5pass) - MD5 encryption password. 32-bit MD5 encryption. - **Filedata** (file) - Optional - Binary stream. The uploaded user's Avatar will be displayed on the ClassIn client. Without uploading the avatar, a pop-up window for selecting the avatar will pop up when the user logs in to the client. File type: jpg, jpeg, gif, png. Size: 300*300. Less than 1 M. - **addToSchoolMember** (integer) - Optional - 0: Do not add the user to the institution; 1: Add to the institution as student; 2: Add to the institution as teacher; Other values: Do not add the user to the institution. If not filled, the default value is 0. When addToSchoolMember is 1 or 2, the user will be displayed in student/teacher management page on ClassIn's management console. And the nicknames will be used in the student/teacher management page. ### Request Example ``` POST /partner/api/course.api.php?action=register Content-Type: multipart/form-data SID=your_school_id safeKey=md5_hash timeStamp=unix_timestamp telephone=001-8006437676 nickname=John Doe password=secret123 addToSchoolMember=1 ``` ### Response #### Success Response (200) No response schema is provided in the source documentation. #### Response Example No response example is provided in the source documentation. ``` -------------------------------- ### POST /partner/api/course.api.php?action=addCourseClassStudent Source: https://docs.eeo.cn/api/en/classroom/addCourseClassStudent.html API documentation for adding a student to multiple lessons in a course. ```APIDOC ## [POST] /partner/api/course.api.php?action=addCourseClassStudent ### Description Adds a student to multiple lessons (classes) of a course. Requires SID, safeKey, timeStamp, courseId, studentUid, and classJson. Returns execution results for each lesson. ### Method POST ### Endpoint https://api.eeo.cn/partner/api/course.api.php?action=addCourseClassStudent ### Parameters #### Request Body (application/x-www-form-urlencoded) - **SID** (string) - Required - School ID, available through the eeo.cn application. - **safeKey** (string) - Required - Fixed 32-bit all lowercase characters. School authentication security key. safeKey=MD5(SECRET+timeStamp). - **timeStamp** (string) - Required - Unix Epoch timestamp (seconds) used by safeKey. - **courseId** (string) - Required - Course ID. - **studentUid** (string) - Required - Student UID. If studentUid is passed to studentAccount at the same time, studentUid prevails. - **classJson** (array) - Required - Class ID array. It is recommended not to exceed 100 lessons at one time. - **ID of class 1** (string) - Required - Class ID. - **ID of class 2** (string) - Optional - Class ID. - **...** (string) - Optional - Class ID. ### Request Example ``` POST /partner/api/course.api.php?action=addCourseClassStudent HTTP/1.1 Host: www.eeo.cn Content-Type: application/x-www-form-urlencoded Cache-Control: no-cache SID=2339736&safeKey=dcbc0d041c043f3a4decabe6d24e61dd&timeStamp=1493712683&courseId=490583&studentUid=1001001&studentName=Jeck&classJson=[1395045,1395044,1395043] ``` ### Response #### Success Response (200) - **data** (array) - Array of data information. - **data return information** (object) - Return message object. - **errno** (number) - Error code. - **error** (string) - Error description. - **error_info** (object) - Return message object. - **errno** (number) - Error code. - **error** (string) - Error description. #### Response Example ``` { "data": [ { "errno": 1, "error": "程序正常执行" } ], "error_info": { "errno": 1, "error": "程序正常执行" } } ``` ### Error Codes | Code | Description | |------|-------------| | 1 | Successful execution. | | 100 | Incomplete or incorrect parameters. | | 102 | No permission (Security verification failed). | | 113 | The mobile phone number has not been registered yet. | | 114 | Server exception. | | 129 | Course teachers cannot be set as students. | | 134 | Illegal mobile phone number. | | 142 | There is no information about the lesson in the course. | | 144 | There is no such course in your institution. | | 145 | The lesson is finished. | | 149 | The course has been deleted. | | 153 | The course is expired and cannot be edited. | | 155 | Array data of students cannot be null. | | 157 | The number of students in the lesson exceeds the limit. | | 158 | Failed to add students to the lesson. | | 164 | The course auditing student already exists. | | 166 | The student already exists in the lesson. | | 212 | The lesson has been deleted. | | 228 | There is no such student in your institution. | | 332 | Course teachers or co-teachers cannot be set as course students or course auditing students. | | 333 | The course advisor cannot be set as a course student. | | 369 | Do not support to operate this type of courses and lessons (public course). | | 400 | The requested data is illegal. | | 466 | The lesson was created in the ClassIn LMS and cannot be edited via API. Please edit in the ClassIn LMS. | | 886 | The student's account has been deleted by the user. | ``` -------------------------------- ### Create Class (Single) Source: https://docs.eeo.cn/api/en/classroom/addCourseClass.html Documentation for creating a single classroom via the API. ```APIDOC ## [POST] /api/class/create ### Description Creates a single classroom under a specified course. Requires course ID, class details, teacher information, student list, and optional settings. Returns the class ID and execution instructions. ### Method POST ### Endpoint /api/class/create ### Parameters #### Request Body - **sid** (string) - Required - The SID for authentication. - **safekey** (string) - Required - The safe key for authentication. - **timeStamp** (string) - Required - The timestamp for the request. - **courseId** (string) - Required - The ID of the course under which the class is created. - **className** (string) - Required - The name of the class. - **classStartTime** (string) - Required - The start time of the class. - **classEndTime** (string) - Required - The end time of the class. - **teacherId** (string) - Required - The ID of the teacher. - **teacherName** (string) - Required - The name of the teacher. - **cloudDriveDirectoryId** (string) - Required - The ID of the cloud drive directory. - **students** (array) - Required - Details of the students. - **coTeacher** (string) - Optional - Co-teacher information. - **power** (boolean) - Optional - Whether the power is enabled. - **hd** (boolean) - Optional - Whether HD is enabled. - **uniqueIdentifier** (string) - Optional - A unique identifier for the class. - **classIntroduction** (string) - Optional - Introduction of the class. - **teacherUid** (string) - Required - The UID of the teacher. - **taUid** (string) - Required - The UID of the TA. ### Request Example { "sid": "your_sid", "safekey": "your_safekey", "timeStamp": "2025-01-01T00:00:00Z", "courseId": "course_123", "className": "Math Class", "classStartTime": "2025-01-01T09:00:00Z", "classEndTime": "2025-01-01T10:00:00Z", "teacherId": "teacher_456", "teacherName": "John Doe", "cloudDriveDirectoryId": "dir_789", "students": [ { "studentId": "student_001", "studentName": "Alice" } ], "coTeacher": "co_teacher_123", "power": true, "hd": false, "uniqueIdentifier": "unique_001", "classIntroduction": "Introduction text", "teacherUid": "uid_teacher_456", "taUid": "uid_ta_789" } ### Response #### Success Response (200) - **classId** (string) - The ID of the created class. - **instructions** (string) - Instructions after execution. - **more_data** (object) - Additional data including live player address and pull stream addresses (if recording is enabled). #### Response Example { "classId": "class_123", "instructions": "Class created successfully.", "more_data": { "livePlayerAddress": "https://example.com/live/class_123", "pullStreamAddress": { "rtmp": "rtmp://example.com/live/class_123", "hls": "https://example.com/live/class_123.m3u8", "flv": "https://example.com/live/class_123.flv" } } } ### Error Handling - **Error Code 121601070** - Returned when the number of lessons under a single course exceeds the limit. This feature is scheduled to go live on February 18, 2025. - **seatNum** - Only 1v1 or 1v6 HD and full HD are supported; the number of people who choose HD can only be 1 or 6. - **Unique Identifier** - If the unique identifier already exists in all created classes under the mechanism, the previously created class ID is returned instead of creating a new class. - **Recording and Broadcasting** - If class recording is set (without live streaming), more_data returns the live streaming player address and the pull stream address is empty. If recording and broadcasting are set, three pull stream addresses (RTMP, HLS, FLV) are bound to the class. If recording is not set, the live player address and pull stream address are empty. ``` -------------------------------- ### Net command example JSON Source: https://docs.eeo.cn/api/en/datasub/details.html Example JSON payload for the 'Net' command, showing network quality metrics like packet counts and CPU usage. ```json { "ClassID": 290274, "ActionTime": 1521547386, "UID": 1001920, "CourseID": 122982, "TimeStamp": 1521547387, "Cmd": "Net", "_id": "5ab0f87aa3251e6e49b9e892", "SID": 1001920, "Data": { "poor": 0, "bad": 0, "total": 331, "good": 331, "normal": 0, "notReach": 0, "cpuLow": 0, "cpuMedium": 10, "cpuHigh": 31, "cpuBusy": 3, "cpuTotal": 44, "localIP": "1.2.3.*" } } ``` -------------------------------- ### JSON response example Source: https://docs.eeo.cn/api/en/onlineDoubleTeacher/editClass.html Example of a JSON data packet returned by the EEO API, showing class information with live stream URLs and status codes. ```json { "code": 1, "msg": "程序正常执行", "data": [ { "isMainClass": 1, "classId": 4157055, "liveUrl": "https://www.eeo.cn/live.php?lessonKey=84b978349296b821", "liveInfo": { "FLV": "https://liveplay.eeo.cn/eeolive/576f5a8ccf87-18329106c1f9d918c.flv?txSecret=4cb4e8a5aae291d6df409e97fd6dae8c&txTime=7d8d37cd", "HLS": "https://liveplay.eeo.cn/eeolive/576f5a8ccf87-18329106c1f9d918c.m3u8?txSecret=4cb4e8a5aae291d6df409e97fd6dae8c&txTime=7d8d37cd", "RTMP": "rtmp://liveplay.eeo.cn/eeolive/576f5a8ccf87-18329106c1f9d918c?txSecret=4cb4e8a5aae291d6df409e97fd6dae8c&txTime=7d8d37cd" }, "code": 1, "msg": "程序正常执行" }, { "isMainClass": 0, "classId": 4157912, "liveUrl": "", "liveInfo": {}, "code": 1, "msg": "程序正常执行" }, { "isMainClass": 0, "classId": 4157913, "liveUrl": "", "liveInfo": {}, "code": 1, "msg": "程序正常执行" } ] } ``` -------------------------------- ### POST /lms/unit/create Source: https://docs.eeo.cn/api/en/LMS/createUnit.html Creates a new unit in the specified course. Requires authentication headers and a JSON body with course ID, unit name, publish flag, and optional content. ```APIDOC ## POST /lms/unit/create ### Description Creates a new unit under a specified course. Duplicate unit names within the same course are not allowed. ### Method POST ### Endpoint `https://root_url/lms/unit/create` ### Parameters #### Header Parameters - **X-EEO-SIGN** (string) - Required - Signature; see the rules here - **X-EEO-UID** (string) - Required - Institution's SID - **X-EEO-TS** (string) - Required - Timestamp #### Body Parameters - **courseId** (integer) - Required - Class (Course) ID - **name** (String) - Required - Unit name | Length must not exceed 50 characters. Duplicate unit names are not allowed under the course. - **publishFlag** (integer) - Required - Publish status | 0 = Draft, 2 = Published (Visible to class members) - **content** (String) - Optional - Unit introduction | Defaults to empty if not provided ### Request Example ```json { "courseId": 414193, "name": "Create Unit", "content": "Unit Description", "publishFlag": 2 } ``` ### cURL Example ```bash curl -X POST \ -H 'Host: root_url' \ -H 'X-EEO-SIGN: 37471286c6cfb95c4afb899396b884e2' \ -H 'X-EEO-UID: 409864' \ -H 'X-EEO-TS: 1722937773' \ -H 'Content-Type: application/json' \ -d '{"courseId": 414193, "name": "Create Unit", "content": "Unit Description", "publishFlag": 2}' \ 'https://root_url/lms/unit/create' ``` ### Response #### Success Response (200) - **code** (integer) - Error code - **msg** (string) - Error message - **data** (array) - Response array - **name** (integer) - Unit name (Example: "Create Unit") - **unitId** (integer) - Unit ID (Example: 26020895) #### Response Example ```json { "code": 1, "msg": "Execution successful", "data": { "name": "Create Unit", "unitId": 26020895 } } ``` ### Error Codes - **147** - No information for this class - **29200** - Unit creation failed - **29208** - Unit already exists - **29213** - Unit created successfully - **40031** - Exceeded the maximum number of units allowed in the class. - **101001001** - Parameter error - **101002005** - Signature exception - **101002006** - Timestamp expired - **101002008** - Timestamp does not exist - **121601020** - Business parameter error - **121601021** - This class does not belong to the your Institution - **121601022** - This is not a standard class - **121601023** - This class has been dissolved and cannot be operated ``` -------------------------------- ### Response Example: JSON Data Packet Source: https://docs.eeo.cn/api/en/onlineDoubleTeacher/deleteClass.html Example JSON response returned when the delete operation is successful. Contains an array of objects with classId, code, and msg. ```json { "code": 1, "msg": "程序正常执行", "data": [ { "classId": 4157912, "code": 1, "msg": "程序正常执行" }, { "classId": 4157913, "code": 1, "msg": "程序正常执行" }, { "classId": 4157055, "code": 1, "msg": "程序正常执行" } ] } ```