The AppServer for the AUI Kits interactive classroom scenario provides backend services, such as logon and classroom management. You can use the AppServer with the AUI Kits interactive classroom scenario SDK to quickly build interactive classroom applications.
API operations
API | Authentication required | Required | Description | ||||
/api/v1/class/login or /login | No | No | Log in. After a successful logon, a token is returned. This token is required to access authorized APIs. | ||||
/api/v1/class/token | Yes | Yes | Gets a token to establish an IM connection. | ||||
/api/v1/class/create | Yes | Yes | Creates a classroom. | ||||
/api/v1/class/list | Yes | Yes | Gets a paginated list of classrooms. | ||||
/api/v1/class/get | Yes | Yes | Gets a single classroom. | ||||
/api/v1/class/joinClass | Yes | Yes | Joins a classroom. | ||||
/api/v1/class/leaveClass | Yes | Yes | Leaves a classroom. | ||||
/api/v1/class/start | Yes | Yes | Let's get started. | ||||
/api/v1/class/stop | Yes | Yes | Ends the class. | ||||
/api/v1/class/pause | Yes | Yes | Pauses the class. | ||||
/api/v1/class/listMembers | Yes | No | Gets the member list. | ||||
/api/v1/class/kickClass | Yes | No | Removes a specified member from the classroom. | ||||
/api/v1/class/update | Yes | No | Updates classroom information, such as announcements. | ||||
/api/v1/class/getMeetingInfo | Yes | No. This API is used only in co-streaming scenarios. | Gets co-streaming information. | ||||
/api/v1/class/updateMeetingInfo | Yes | No. This API is used only in co-streaming scenarios. | Updates co-streaming information. | ||||
/api/v1/class/getWhiteboardAuthInfo | Yes | Yes | Gets the whiteboard identity verification API. | ||||
/api/v1/class/addDoc | Yes | Yes | Adds a courseware. | ||||
/api/v1/class/deleteDoc | Yes | Yes | Deletes a courseware. | ||||
/api/v1/class/queryDoc | Yes | Yes | Queries classroom courseware. | ||||
/api/v1/class/addDocs | Yes | Yes | Adds courseware in batches. | ||||
/api/v1/class/deleteDocs | Yes | Yes | Deletes courseware in batches. | ||||
/api/v1/class/setAssistantPermit | Yes | Yes | Sets teaching assistant permissions. | ||||
/api/v1/class/deleteAssistantPermit | Yes | Yes | Deletes teaching assistant permissions. | ||||
/api/v1/class/getAssistantPermit | Yes | Yes | Gets teaching assistant permissions. | ||||
Authentication method
The authentication implementation in the demo is for reference only. You can adjust the authentication policy as needed.
First, call the /login API to obtain an authentication token. Then, add the token to the request header before calling other APIs.
Detailed API definitions
Log on
You can implement this API as needed. The token generation algorithm can also be customized. Ensure that the same algorithm is used to generate and verify tokens.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /login or /api/v1/class/login
Authorization required: No
Request method: POST
Request Content-Type: JSON
Request parameters
In the demo, you can log on only if the username and password are the same.
Name | Type | Required | Example | Description |
username | String | Yes | usernamexxx | The username. |
password | String | Yes | passwordxxxx | The password. |
Returned data
Name | Type | Example | Description |
success | Boolean | true | Indicates whether the operation was successful. |
data | String | 2023-02-28T14:38:06+08:00 | The expiration time. The time is in UTC format. |
String | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9*** | The authorization credential. By default, it is generated using JWT. |
Request example
{
"username":"usernamexxx",
"password":"passwordxxxx"
}Response example
{
"success": true,
"data": {
"expire": "2023/08/15 14:54:58",
"token": "eyJ0eXAiOiJKV1QiLC****"
}
}Get a token for the IM connection
The AppServer calls the GetMessageToken API of ApsaraVideo Live Interactive Messages.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/token
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description |
user_id | String | Yes | useridxxxx | The user ID. You can customize this ID. The ID must be unique within the application. |
device_id | String | Yes | deviceidxxx | The ID of the terminal device. The ID uniquely identifies a user's terminal device. You can customize this ID. |
device_type | String | Yes | android | The type of the terminal device. Valid values: `ios`, `android`, `web`, and `pc`. |
im_server | Array | Yes | ["aliyun", "rongCloud"] or ["aliyun"] or ["rongCloud"] | A string array. To support interactive messages from both Alibaba Cloud and RongCloud, pass `aliyun` and `rongCloud`. Otherwise, pass the required value. |
Returned data
Name | Type | Example | Description |
success | bool | true | Indicates whether the operation was successful. |
data | String | oauth_cloud_key:***-b0YY5Gy6Q | The token used to establish a persistent connection. |
String | oauth_cloud_key:***-b0YY5Gy6Q | The refresh token. If the access token expires, you can use the refresh token to get a new access token. |
Request example
{
"user_id": "useridxxxx",
"device_id": "deviceidxxxxx",
"device_type":"android"
}Response example
{
"success": true,
"data": {
"access_token": "MuYwWTNPVGTmhWFby****",
"refresh_token": "uY29kkuSWnBZMFM5****"
}
}Create a classroom
The AppServer calls the following APIs:
Generate streaming URLs: Generate streaming URLs.
Co-streaming URL rules: Co-streaming URL rules.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/create
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
title | String | Yes | titlexxxx | The class title. | |||
notice | String | No | noticexxx | The classroom announcement. | |||
teacher_id | String | Yes | teacherxxxx | The teacher ID. | |||
teacher_nick | String | No | teachernickxxxx | The teacher's nickname. | |||
mode | Integer | No | 0 | The classroom mode. Default value: 0.
| |||
extends | String | No | {"xx":"xxx"} | The extension field, which is a JSON-formatted string. | |||
Returned data
Name | Type | Example | Description | ||||
success | Boolean | true | Indicates whether the operation was successful. | ||||
data | id | String | ee487235-5f9b-4cb3-82ce-45c91c3xxxx | The classroom ID. | |||
created_at | String | 2023-02-27T17:34:00.592750182+08:00 | The creation time. | ||||
updated_at | String | 2023-02-27T17:34:00.592750182+08:00 | The update time. | ||||
title | String | titlexxx | The classroom title. | ||||
notice | String | noticexxx | The classroom announcement. | ||||
teacher_id | String | teacher_idxxx | The teacher ID. | ||||
teacher_nick | String | teacher_nickxxx | The teacher's nickname. | ||||
extends | String | {"xx":"xxx"} | The extension field. | ||||
status | Integer | 0 | The classroom status: 0: Preparing 1. Attend class 2. End of class | ||||
mode | Integer | 0 | The classroom mode.
| ||||
chat_id | String | ee487235-5f9b-4cb3-82ce-45c91c3xxxx | The IM group ID. | ||||
meeting_id | String | 0a7656c4-c01b-424d-9882-xxxxxx | The co-streaming ID. | ||||
meeting_info | String | {"members":[{"user_id":"xxx","user_nick":"xxx","user_avatar":"http://xxx"}]} | A JSON string. Information about co-streaming viewers. | ||||
link_info | JSON | A collection of co-streaming URLs. | |||||
link_info.rtc_push_url | String | artc://live.aliyun.com/push/xxxx | The RTC ingest URL. | ||||
link_info.rtc_pull_url | String | artc://live.aliyun.com/play/xxxx | The RTC stream pulling URL. | ||||
link_info.cdn_pull_info | JSON | A collection of stream pulling URLs for regular viewers. | |||||
link_info.cdn_pull_info.rtmp_url | String | rtmp://pullxxxx | Stream pulling over RTMP. | ||||
link_info.cdn_pull_info.rts_url | String | artc://pullxxxx | The RTS stream pulling URL. | ||||
link_info.cdn_pull_info.hls_url | String | http://pullxxxx.m3u8?xxxx | The HLS stream pulling URL. | ||||
link_info.cdn_pull_info.flv_url | String | http://pullxxxx.flv?xxxx | The FLV stream pulling URL. | ||||
Request example
{
"title": "titlexxx",
"notice": "noticexxx",
"teacher_id":"teacherId",
"teacher_nick":"teacherNick",
"mode":0,
"extends":"{\"xx\":\"xxx\"}"
}Response example
{
"success": true,
"data": {
"id": "3125adcd-06c0-469f-8c5e****",
"title": "Class 2014346",
"status": 0,
"mode": 0,
"boards": "{\"appKey\":\"xxxx\",\"boardId\":\"xxxxxxxxxxx-469f-xxxx-bbb30cf97a96\",\"boardTitle\":\"Class 2014346\",\"cid\":\"1346126033569775\",\"code\":200,\"message\":\"succeed\",\"uid\":1691478833}",
"created_at": "2023/08/08 15:13:53",
"updated_at": "2023/08/08 15:13:53",
"extends": "{}",
"chat_id": "3125adcd-06c0-469f-8c5e-bbb30****",
"meeting_id": "977a1866-f469-4646-9dc4-85ae45****",
"teacher_id": "test072",
"teacher_nick": "test072",
"link_info": {
"rtc_push_url": "artc://lxxxxxxxxxxxxxx",
"rtc_pull_url": "artc://xxxxxxxxxxxxxxxxxxx",
"cdn_pull_info": {
"rtmp_url": "rtmp://xxxxxxxxxxxxxxxxxxx",
"rts_url": "artc://xxxxxxxxxxxxxxx",
"flv_url": "https://xxxxxxxxxxxxxxx",
"hls_url": "https://xxxxxxxxxxxxxxxxxxxxxxxxx",
"rtmp_oriaac_url": "rtmp://xxxxxxxxxxxxxxxxxxxxx",
"rts_oriaac_url": "artc://xxxxxxxxxxxxxxxxxxxxxxxx",
"flv_oriaac_url": "https://xxxxxxxxxxxxxxxxxxxx",
"hls_oriaac_url": "https://xxxxxxxxxxxxxxxxxxxx"
}
}
}
}Get a paginated list of classrooms
The AppServer calls the following APIs:
SearchMedia: Search for media information.
GetPlayInfo: Get audio and video playback URLs.
The ingest URL is returned only if the requested `user_id` is the group owner.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/list
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
user_id | String | Yes | useridxxx | The user ID. | |||
page_num | Integer | Yes | 1 | The page number. Default value: 1. | |||
page_size | Integer | Yes | 10 | The number of entries per page. Default value: 10. | |||
Response parameters
Name | Type | Example value | Description | ||||
success | bool | true | Indicates whether the operation was successful. | ||||
data | id | String | ee487235-5f9b-4cb3-82ce-45c91c3xxxx | The classroom ID. | |||
created_at | String | 2023-02-27T17:34:00.592750182+08:00 | The creation time. | ||||
updated_at | String | 2023-02-27T17:34:00.592750182+08:00 | The update time. | ||||
started_at | String | 2023-02-27T18:54:37+08:00 | Class schedule | ||||
stopped_at | String | 2023-02-27T19:25:37+08:00 | The time when the class ended. | ||||
title | String | titlexxx | The class title. | ||||
notice | String | noticexxx | The class announcement. | ||||
teacher_id | String | teacher_idxxx | The teacher ID. | ||||
teacher_nick | String | teacher_nickxxx | The teacher's nickname. | ||||
extends | String | {"xx":"xxx"} | The extension field. | ||||
status | Integer | 0 | The class status. 0: Preparing 1. Attend the class. 2: End of Class | ||||
mode | Integer | 0 | The classroom mode.
| ||||
chat_id | String | ee487235-5f9b-4cb3-82ce-45c91c3xxxx | The IM group ID. | ||||
meeting_id | String | 0a7656c4-c01b-424d-9882-xxxxxx | The co-streaming ID. | ||||
meeting_info | String | {"members":[{"user_id":"xxx","user_nick":"xxx","user_avatar":"http://xxx"}]} | A JSON string. Information about co-streaming viewers. | ||||
vod_info | JSON | Information about the recorded classroom video. | |||||
vod_info.status | Integer | 1 | The status of the recorded video.
| ||||
vod_info.playlist | Array | Information about the recorded video. | |||||
vod_info.playlist[].bit_rate | String | 858.198 | The bitrate of the media stream. | ||||
vod_info.playlist[].creation_time | String | 2017-06-26T06:38:48Z | The time when the audio or video file was created. The time is in the `yyyy-MM-ddTHH:mm:ssZ` format (UTC). | ||||
vod_info.playlist[].definition | String | OD | The definition of the video stream.
| ||||
vod_info.playlist[].duration | String | 67.685 | The duration of the media stream in seconds. | ||||
vod_info.playlist[].format | String | m3u8 | The format of the media stream.
| ||||
vod_info.playlist[].fps | String | 90000.0 | The frame rate of the media stream. | ||||
vod_info.playlist[].height | Long | 720 | The height of the media stream in pixels. | ||||
vod_info.playlist[].width | Long | 1280 | The width of the media stream in pixels. | ||||
vod_info.playlist[].play_url | String | https://vod.h5vxxx/Record/VOD_NO_TRANSCODE/live/b92ed0ce-e29f-4df3-984a-dbxxxx.m3u8 | The playback URL of the video stream. | ||||
vod_info.playlist[].size | Long | 3034884 | The size of the media stream in bytes. | ||||
vod_info.playlist[].status | String | Normal | The status of the media stream. Valid values:
| ||||
vod_info.playlist[].stream_type | String | The type of the media stream. If the media stream is a video, the value is `video`. If the media stream is audio-only, the value is `audio`. | |||||
user_status | JSON | The mute status of the user. | |||||
user_status.mute | Boolean | false | Indicates whether the user is muted. Valid values:
| ||||
user_status.mute_source | String | This parameter is not returned for now. | |||||
link_info | JSON | A collection of co-streaming URLs. | |||||
link_info.rtc_push_url | String | artc://live.aliyun.com/push/xxxx | The RTC ingest URL. | ||||
link_info.rtc_pull_url | String | artc://live.aliyun.com/play/xxxx | The RTC stream pulling URL. | ||||
link_info.cdn_pull_info | JSON | A collection of stream pulling URLs for regular viewers. | |||||
link_info.cdn_pull_info.rtmp_url | String | rtmp://pullxxxx | The RTMP stream pulling URL. | ||||
link_info.cdn_pull_info.rts_url | String | artc://pullxxxx | The RTS stream pulling URL. | ||||
link_info.cdn_pull_info.hls_url | String | http://pullxxxx.m3u8?xxxx | HLS stream pulling | ||||
link_info.cdn_pull_info.flv_url | String | http://pullxxxx.flv?xxxx | The FLV stream pulling URL. | ||||
Request example
{
"page_size": 10,
"page_num":1,
"user_id": "useridxxxx"
}Response example
{
"success": true,
"data": [
{
"id": "848018e7-7475-4cdc-802c-2****",
"title": "class_2014346",
"status": 0,
"mode": 0,
"meetingInfo": "{\"members\":[{\"camera_opened\":true,\"mic_opened\":true,\"rtc_pull_url\":\"artc://class.aliyun.com/play/2bafb67b-4491-4686-a8a9-f049192e8027?sdkAppId=7c61616e-480b-4de6-b3fc-95cef48f5b53&userId=paperclouds×tamp=1681806125&token=b341f9c4ceb9c6693439d9582a77e2392608bd0b9d5e0e17fdde94e019e91716\",\"user_avatar\":\"https://img.alicdn.com/imgextra/i1/O1CN01P6zzLk1muv3zymjjD_!!6000000005015-2-tps-80-80.png\",\"user_id\":\"paperclouds\",\"user_nick\":\"paperclouds\"}]}",
"boards": "{\"appKey\":\"1539cfca9****\",\"boardId\":\"*****8bc90dc\",\"boardTitle\":\"class_2014346\",\"cid\":\"1346145199998938\",\"code\":200,\"message\":\"succeed\",\"uid\":1692063745}",
"created_at": "2023/08/15 09:42:26",
"updated_at": "2023/08/15 09:52:22",
"extends": "{}",
"chat_id": "848018e7-7475-4cdc-802c-2****",
"meeting_id": "ef6ec82b-0f69-48d9-b8eb-962****",
"teacher_id": "test_1234567",
"teacher_nick": "test_11",
"user_status": {
"mute": false,
"mute_source": []
},
"link_info": {
"rtc_push_url": "artc://live.aliyun.com/push/******",
"rtc_pull_url": "artc://live.aliyun.com/play/******",
"cdn_pull_info": {
"rtmp_url": "rtmp://ep-pull.h5video.vip/live/******",
"rts_url": "artc://ep-pull.h5video.vip/live/******",
"flv_url": "https://ep-pull.h5video.vip/live/******",
"hls_url": "https://ep-pull.h5video.vip/live/******",
"rtmp_oriaac_url": "rtmp://ep-pull.h5video.vip/live/******",
"rts_oriaac_url": "artc://ep-pull.h5video.vip/live/******",
"flv_oriaac_url": "https://ep-pull.h5video.vip/live/******",
"hls_oriaac_url": "https://ep-pull.h5video.vip/live/******"
}
},
"metrics": {
"pv": 0,
"uv": 0,
"like_count": 0,
"online_count": 0
}
},
{
"id": "70c77020-2783-48c2-9088-539****",
"title": "class_2014346",
"status": 1,
"mode": 0,
"boards": "{\"appKey\":\"1539cfca9ff****\",\"boardId\":\"7****c2-9088-5391abe075ac\",\"boardTitle\":\"class_2014346\",\"cid\":\"1346142836901860\",\"code\":200,\"message\":\"succeed\",\"uid\":1691991630}",
"created_at": "2023/08/14 13:40:31",
"updated_at": "2023/08/14 13:49:27",
"extends": "{}",
"chat_id": "70c77020-2783-48c2-9088-5391a******",
"meeting_id": "91b6e34a-f19c-44bb-8c8a-acc5******",
"teacher_id": "test072",
"teacher_nick": "test072",
"started_at": "2023/08/14 13:49:27",
"stopped_at": "2023/08/14 13:48:53",
"user_status": {
"mute": false,
"mute_source": []
},
"link_info": {
"rtc_push_url": "artc://live.aliyun.com/push/******",
"rtc_pull_url": "artc://live.aliyun.com/play/******",
"cdn_pull_info": {
"rtmp_url": "rtmp://ep-pull.h5video.vip/live/*******",
"rts_url": "artc://ep-pull.h5video.vip/live/*******",
"flv_url": "https://ep-pull.h5video.vip/live/*******",
"hls_url": "https://ep-pull.h5video.vip/live/******",
"rtmp_oriaac_url": "rtmp://ep-pull.h5video.vip/live/******",
"rts_oriaac_url": "artc://ep-pull.h5video.vip/live/******",
"flv_oriaac_url": "https://ep-pull.h5video.vip/live/******",
"hls_oriaac_url": "https://ep-pull.h5video.vip/live/******"
}
},
"metrics": {
"pv": 0,
"uv": 0,
"like_count": 0,
"online_count": 0
}
}
]
}Get a single classroom
Implementation: For more information, see the implementation of /api/v1/class/list.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/get
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example value | Description |
id | String | Yes | 89bdb7ab-7fa9-4061-8a73-c7c18a9c**** | The classroom ID. |
user_id | String | Yes | Ced**** | The user ID. |
Returned Data
Name | Type | Example | Description | ||||
success | Boolean | true | Indicates whether the operation succeeded. | ||||
data | id | String | 89bdb7ab-7fa9-4061-8a73-c7c18a9c**** | The classroom ID. | |||
created_at | String | 2023/11/24 11:20:44 | The creation time. | ||||
updated_at | String | 2023/11/24 11:20:44 | The update time. | ||||
started_at | String | 2023-02-27T18:54:37+08:00 | Class Time | ||||
stopped_at | String | 2023-02-27T19:25:37+08:00 | The time when the class ended. | ||||
title | String | Live stream title | The class title. | ||||
notice | String | noticexxx | The class announcement. | ||||
teacher_id | String | teacher_idxxx | The teacher ID. | ||||
teacher_nick | String | teacher_nickxxx | The teacher's nickname. | ||||
extends | String | {"xx":"xxx"} | The extension field. | ||||
status | Integer | 0 | The class status. 0: Preparing 1. Attend class 2: Finished | ||||
mode | Integer | 0 | The classroom mode.
| ||||
chat_id | String | ee487235-5f9b-4cb3-82ce-45c91c3**** | The IM group ID. | ||||
meeting_id | String | 0a7656c4-c01b-424d-9882-23**** | The co-streaming ID. | ||||
meeting_info | String | {"members":[{"user_id":"xxx","user_nick":"xxx","user_avatar":"http://xxx"}]} | A JSON string. Information about co-streaming viewers. | ||||
vod_info | JSON | Information about the recorded classroom video. | |||||
vod_info.status | Integer | 1 | The status of the recorded video.
| ||||
vod_info.playlist | Array | Information about the recorded video. | |||||
vod_info.playlist[].bit_rate | String | 858.198 | The bitrate of the media stream. | ||||
vod_info.playlist[].creation_time | String | 2017-06-26T06:38:48Z | The time when the audio or video file was created. The time is in the `yyyy-MM-ddTHH:mm:ssZ` format (UTC). | ||||
vod_info.playlist[].definition | String | OD | The definition of the video stream.
| ||||
vod_info.playlist[].duration | String | 67.685 | The duration of the media stream in seconds. | ||||
vod_info.playlist[].format | String | m3u8 | The format of the media stream.
| ||||
vod_info.playlist[].fps | String | 90000.0 | The frame rate of the media stream. | ||||
vod_info.playlist[].height | Long | 720 | The height of the media stream in pixels. | ||||
vod_info.playlist[].width | Long | 1280 | The width of the media stream in pixels. | ||||
vod_info.playlist[].play_url | String | https://vod.h5vxxx/Record/VOD_NO_TRANSCODE/live/b92ed0ce-e29f-4df3-984a-dbxxxx.m3u8 | The playback URL of the video stream. | ||||
vod_info.playlist[].size | Long | 3034884 | The size of the media stream in bytes. | ||||
vod_info.playlist[].status | String | Normal | The status of the media stream. Valid values:
| ||||
vod_info.playlist[].stream_type | String | The type of the media stream. If the media stream is a video, the value is `video`. If the media stream is audio-only, the value is `audio`. | |||||
user_status | JSON | The mute status of the user. | |||||
user_status.mute | Boolean | false | Indicates whether the user is muted. Valid values:
| ||||
user_status.mute_source | String | This parameter is not returned for now. | |||||
link_info | JSON | A collection of co-streaming URLs. | |||||
link_info.rtc_push_url | String | artc://live.aliyun.com/push/xxxx | The RTC ingest URL. | ||||
link_info.rtc_pull_url | String | artc://live.aliyun.com/play/xxxx | The RTC stream pulling URL. | ||||
link_info.cdn_pull_info | JSON | A collection of stream pulling URLs for regular viewers. | |||||
link_info.cdn_pull_info.rtmp_url | String | rtmp://pullxxxx | The RTMP stream pulling URL. | ||||
link_info.cdn_pull_info.rts_url | String | artc://pullxxxx | The RTS stream pulling URL. | ||||
link_info.cdn_pull_info.hls_url | String | http://pullxxxx.m3u8?xxxx | The HLS stream pulling URL. | ||||
link_info.cdn_pull_info.flv_url | String | http://pullxxxx.flv?xxxx | The FLV stream pulling URL. | ||||
assistantPermit | jsonObject | The teaching assistant information. | |||||
assistantPermit.identity | Integer | 2 | The identity of the teaching assistant. Only 2 is returned.
| ||||
assistantPermit.user_id | String | uid_0811 | The UID of the teaching assistant. | ||||
assistantPermit.user_name | String | nick_0811 | The nickname of the teaching assistant. | ||||
assistantPermit.user_avatar | String | https://abc.com.jpg | The profile picture of the teaching assistant. | ||||
assistantPermit.join_time | String | 2023/11/24 11:45:11 | The time when the teaching assistant joined. | ||||
assistantPermit.status | Integer | 1 | The status of the teaching assistant. Only 1 is returned.
| ||||
Request example
{
"id": "675e6783-0bac-4990-b6da-5aa89053****",
"user_id": "Cedric8"
}Response example
{
"success": true,
"data": {
"id": "89bdb7ab-7fa9-4061-8a73-c7c18a9c****",
"title": "Live stream title",
"status": 0,
"mode": 1,
"boards": "{\"appKey\":\"1539cfca9ffb1907612ace273f34****\",\"boardId\":\"89bdb7ab-7fa9-4061-8a73-c7c18a9c****\",\"boardTitle\":\"Live stream title\",\"cid\":\"134746471155****\",\"code\":200,\"message\":\"succeed\",\"uid\":170079****}",
"created_at": "2023/11/24 11:20:44",
"updated_at": "2023/11/24 11:20:44",
"extends": "{\"xx\":\"xxx\"}",
"aliyun_id": "89bdb7ab-7fa9-4061-8a73-c7c18a9c****",
"meeting_id": "e65c9abd-0def-49c3-b7db-29380dbc****",
"teacher_id": "t2****",
"user_status": {
"mute": false,
"mute_source": []
},
"link_info": {
"rtc_push_url": "artc://live.aliyun.com/push/e65c9abd-0def-49c3-b7db-29380dbc****?sdkAppId=92429219-d3a6-458a-b72f-74be290e****&userId=Cedric8×tamp=1700884074&token=ee3b0b5458292764aff42265cc16ef10c55cfd817983da32c5aab67b63d8****",
"rtc_pull_url": "artc://live.aliyun.com/play/e65c9abd-0def-49c3-b7db-29380dbc****?sdkAppId=92429219-d3a6-458a-b72f-74be290e****&userId=Cedric8×tamp=1700884074&token=ee3b0b5458292764aff42265cc16ef10c55cfd817983da32c5aab67b63d8****",
"cdn_pull_info": {
"rtmp_url": "rtmp://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_camera?auth_key=1701402474-0-0-5488182f42c55597d7a65262cb93****",
"rts_url": "artc://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_camera?auth_key=1701402474-0-0-5488182f42c55597d7a65262cb93****",
"flv_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_camera.flv?auth_key=1701402474-0-0-217690ced5d7ae166b8222718cc7****",
"hls_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_camera.m3u8?auth_key=1701402474-0-0-311865f889ab94b531b776deeb22*****",
"rtmp_oriaac_url": "rtmp://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_camera_oriaac?auth_key=1701402474-0-0-de0468d8013516c2d5b1c251a042****",
"rts_oriaac_url": "artc://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_camera_oriaac?auth_key=1701402474-0-0-de0468d8013516c2d5b1c251a042****",
"flv_oriaac_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_camera_oriaac.flv?auth_key=1701402474-0-0-9ff4d9db9fe41cc08f1b950ce385****",
"hls_oriaac_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_camera_oriaac.m3u8?auth_key=1701402474-0-0-50c98d4262ed304d82d228b6eb0e****",
"rtmp_screen_url": "rtmp://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_shareScreen?auth_key=1701402474-0-0-c880a5255d02860d2830333c2179****",
"rts_screen_url": "artc://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_shareScreen?auth_key=1701402474-0-0-c880a5255d02860d2830333c2179****",
"flv_screen_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_shareScreen.flv?auth_key=1701402474-0-0-5d5a4c3537fbf97732f4091c6507****",
"hls_screen_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_shareScreen.m3u8?auth_key=1701402474-0-0-7bea0e5a1e715167ed0163dc28d2****",
"rtmp_screen_oriaac_url": "rtmp://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_shareScreen_oriaac?auth_key=1701402474-0-0-49a353bc7045bc7e02b30011744****",
"rts_screen_oriaac_url": "artc://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_shareScreen_oriaac?auth_key=1701402474-0-0-49a353bc7045bc7e02b30011744a****",
"flv_screen_oriaac_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_shareScreen_oriaac.flv?auth_key=1701402474-0-0-884d844b495211998c17deff2de4****",
"hls_screen_oriaac_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbc****_t2****_shareScreen_oriaac.m3u8?auth_key=1701402474-0-0-d7082418622843fa2d2bc6328df8****"
}
},
"shadow_link_info": {
"rtc_push_url": "artc://live.aliyun.com/push/e65c9abd-0def-49c3-b7db-29380dbc****?sdkAppId=92429219-d3a6-458a-b72f-74be290efe28&userId=Cedric8_shadow×tamp=1700884074&token=3d7eb925d972507649b8a4449a973ea42b5bc61436b81197152ab85b039e68bb",
"rtc_pull_url": "artc://live.aliyun.com/play/e65c9abd-0def-49c3-b7db-29380dbc****?sdkAppId=92429219-d3a6-458a-b72f-74be290efe28&userId=Cedric8_shadow×tamp=1700884074&token=3d7eb925d972507649b8a4449a973ea42b5bc61436b81197152ab85b039e68bb",
"cdn_pull_info": {
"rtmp_url": "rtmp://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_camera?auth_key=1701402474-0-0-0e9ecb44e8679cf499d97a5b7f134f49",
"rts_url": "artc://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_camera?auth_key=1701402474-0-0-0e9ecb44e8679cf499d97a5b7f134f49",
"flv_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_camera.flv?auth_key=1701402474-0-0-4e87b9507ab9fd9e292a4b3c7cab57bc",
"hls_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_camera.m3u8?auth_key=1701402474-0-0-a63f44591197376c468e35efabb86d7c",
"rtmp_oriaac_url": "rtmp://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_camera_oriaac?auth_key=1701402474-0-0-99ce59f488f32f7060b56068a8221389",
"rts_oriaac_url": "artc://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_camera_oriaac?auth_key=1701402474-0-0-99ce59f488f32f7060b56068a8221389",
"flv_oriaac_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_camera_oriaac.flv?auth_key=1701402474-0-0-584f2e4fb304c8a83f615a3cb68aa1cc",
"hls_oriaac_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_camera_oriaac.m3u8?auth_key=1701402474-0-0-78d9904b39938fe340883b1615afd892",
"rtmp_screen_url": "rtmp://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_shareScreen?auth_key=1701402474-0-0-634f9900cc06265fcea122b7b302e8bc",
"rts_screen_url": "artc://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_shareScreen?auth_key=1701402474-0-0-634f9900cc06265fcea122b7b302e8bc",
"flv_screen_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_shareScreen.flv?auth_key=1701402474-0-0-a2d31ee5cec8c2f652546117e9857fda",
"hls_screen_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_shareScreen.m3u8?auth_key=1701402474-0-0-7f12b3daf2be89ff96d974df72d4a889",
"rtmp_screen_oriaac_url": "rtmp://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_shareScreen_oriaac?auth_key=1701402474-0-0-ac851500fe28704e42393229eefb9bf5",
"rts_screen_oriaac_url": "artc://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_shareScreen_oriaac?auth_key=1701402474-0-0-ac851500fe28704e42393229eefb9bf5",
"flv_screen_oriaac_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_shareScreen_oriaac.flv?auth_key=1701402474-0-0-4e4c1fb7bb058ac33c5cb5bf01a07433",
"hls_screen_oriaac_url": "https://ep-pull.h5video.vip/live/92429219-d3a6-458a-b72f-74be290efe28_e65c9abd-0def-49c3-b7db-29380dbced69_t2ss_shadow_shareScreen_oriaac.m3u8?auth_key=1701402474-0-0-c16b0fda1b3ed0f54eea180f79d95271"
}
},
"metrics": {
"pv": 0,
"uv": 0,
"like_count": 0,
"online_count": 0
},
"assistantPermit": {
"identity": 2,
"status": 1,
"class_id": "89bdb7ab-7fa9-4061-8a73-c7c18a9c****",
"user_id": "0811",
"user_name": "0811",
"user_avatar": "https://abc.com.jpg",
"join_time": "2023/11/24 11:45:11"
}
}
}Join a classroom
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/joinClass
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description |
class_id | String | Yes | titlexxxx | The classroom ID. |
user_id | String | Yes | noticexxx | The user ID. |
user_name | String | Yes | teacherxxxx | The username. |
user_avatar | String | No | teachernickxxxx | The user's profile picture. |
identity | Integer | No | 2 | If the user is a teaching assistant, you must set `identity` to 2. For other roles, you can leave this parameter empty. |
Returned data
Name | Type | Example | Description | |||||
success | Boolean | true | Indicates whether the operation was successful. | |||||
Request example
{
"class_id":"ce4da2e0-18a1-40fe-a9c8-840*****",
"user_id":"0810",
"user_name":"0810",
"user_avatar":"https://****.jpg"
}Response example
{
"success": true
}Note
The frontend must handle two exceptions that can occur when you join a classroom:
`ClassNotAssistantPermit`: The teaching assistant permission is not created. The teaching assistant cannot log on.
{ "success": false, "data": { "reason": "ClassNotAssistantPermit" } }`ClassHasAssistant`: A teaching assistant is already online in the classroom. Another teaching assistant cannot log on.
{ "success": false, "data": { "reason": "ClassHasAssistant" } }
Leave a classroom
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/leaveClass
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
class_id | String | Yes | titlexxxx | The classroom ID. | |||
user_id | String | Yes | noticexxx | The user ID. | |||
Return data
Name | Type | Example | Description | |||||
success | Boolean | true | Success. | |||||
Request example
{
"class_id":"ce4da2e0-18a1-40fe-a9c8-84078a*****",
"user_id":"0810"
}Response example
{
"success": true
}Start the class
Implementation: Modify the value of the `status` field for the classroom in the database. Ensure cache consistency.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/start
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
user_id | String | Yes | useridxxxx | The user ID. You can customize this ID. The ID must be unique within the application. | |||
id | String | Yes | classIdxxxx | The classroom ID. | |||
Returned data
For more information about the response parameters, see the response parameters of the /api/v1/class/get API.
Request example
{
"id": "675e6783-0bac-4990-b6da-5aa8*****",
"user_id": "useridxxxx"
}Response example
For more information about the response example, see the response example of the /api/v1/class/get API.
End the class
Implementation: Modify the value of the `status` field for the classroom in the database. Ensure cache consistency.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/stop
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
user_id | String | Yes | useridxxxx | The user ID. You can customize this ID. The ID must be unique within the application. | |||
id | String | Yes | classIdxxxx | The classroom ID. | |||
Returned data
For more information about the response parameters, see the response parameters of the /api/v1/class/get API.
Request example
{
"id": "675e6783-0bac-4990-b6da-5aa890*****",
"user_id": "useridxxxx"
}Response example
For more information about the response example, see the response example of the /api/v1/class/get API.
Pause the class
Implementation: Modify the value of the `status` field for the classroom in the database. Ensure cache consistency.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/pause
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
user_id | String | Yes | useridxxxx | The user ID. You can customize this ID. The ID must be unique within the application. | |||
id | String | Yes | classIdxxxx | The classroom ID. | |||
Return data
For more information about the response parameters, see the response parameters of the /api/v1/class/get API.
Request example
{
"id": "675e6783-0bac-4990-b6da-5aa8*****",
"user_id": "useridxxxx"
}Response example
For more information about the response example, see the response example of the /api/v1/class/get API.
Get the member list
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/listMembers
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
class_id | String | Yes | titlexxxx | The classroom ID. | |||
identity | Integer | Yes | 0 | The role. 0: All 1: Student 2: Teacher | |||
status | Integer | Yes | 0 | The member status. 0: All 1: Normal 2: Left 3: Kicked out | |||
page_num | Integer | No | 1 | The page number. Default value: 1. | |||
page_size | Integer | No | 10 | The number of entries per page. Default value: 10. | |||
Response parameters
Name | Type | Example | Description | |||||
success | Boolean | true | Indicates whether the request was successful. | |||||
data | JSON | |||||||
data.total | Integer | 16 | The total number of entries. | |||||
data.members | Array | |||||||
data.members.identity | Integer | 1 | The role. 1: Student 2: Teacher | |||||
data.members.status | Integer | 1 | The member status. 1: Normal 2: Left 3: Kicked out | |||||
data.members.user_id | String | user_xxxx | The user ID. | |||||
data.members.user_name | String | user_namexxxx | The username. | |||||
data.members.user_avatar | String | http://xxxx.jpg | The user's profile picture. | |||||
data.members.join_time | String | 2023/09/25 16:07:30 | The time when the user joined. | |||||
Request example
{
"class_id":"2dfc1f72-9340-4899-ae8c-8474*****",
"identity":0,
"status":0,
"page_num":1,
"page_size":10
}Response example
{
"success": true,
"data": {
"total": 17,
"members": [
{
"identity": 2,
"status": 2,
"user_id": "dev0808",
"user_name": "dev0808",
"user_avatar": "https://img.alicdn.com/imgextra/i1/*****.png",
"join_time": "2023/09/25 20:32:44"
},
{
"identity": 1,
"status": 1,
"user_id": "dev0810",
"user_name": "dev0810",
"user_avatar": "https://img.alicdn.com/imgextra/i1/******.png",
"join_time": "2023/09/25 20:47:58"
},
{
"identity": 1,
"status": 2,
"user_id": "dev0802",
"user_name": "dev0802",
"join_time": "2023/09/25 20:13:50"
},
{
"identity": 1,
"status": 2,
"user_id": "dev0809",
"user_name": "dev0809",
"join_time": "2023/09/25 16:07:30"
},
{
"identity": 1,
"status": 3,
"user_id": "online0808",
"user_name": "online0808",
"user_avatar": "https://img.alicdn.com/imgextra/i1/*****.png",
"join_time": "2023/09/25 20:40:47"
},
{
"identity": 1,
"status": 3,
"user_id": "dev0801",
"user_name": "dev0801",
"join_time": "2023/09/25 19:28:39"
},
{
"identity": 1,
"status": 3,
"user_id": "test111117",
"user_name": "test111117",
"user_avatar": "https://abc.***.jpg",
"join_time": "2023/09/25 19:22:09"
},
{
"identity": 1,
"status": 3,
"user_id": "test111116",
"user_name": "test111116",
"user_avatar": "https://abc.***.jpg",
"join_time": "2023/09/25 19:19:08"
},
{
"identity": 1,
"status": 3,
"user_id": "test111115",
"user_name": "test111115",
"join_time": "2023/09/25 19:17:01"
},
{
"identity": 1,
"status": 3,
"user_id": "dev0807",
"user_name": "dev0807",
"join_time": "2023/09/25 19:15:37"
}
]
}
}Remove from classroom
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/kickClass
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
class_id | String | Yes | titlexxxx | The classroom ID. | |||
user_id | String | Yes | noticexxx | The user ID. | |||
Return data
Name | Type | Example Value | Description | |||||
success | bool | true | Indicates whether the request was successful. | |||||
Request example
{
"class_id":"ce4da2e0-18a1-40fe-a9c8-840*****",
"user_id":"0810"
}Response example
{
"success": true
}Update classroom information, such as announcements
Implementation: Modify the classroom information in the database.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/update
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
user_id | String | Yes | useridxxxx | The user ID. You can customize this ID. The ID must be unique within the application. | |||
id | String | Yes | classIdxxxx | The classroom ID. | |||
title | String | No | titlexxx | The classroom title. | |||
Return data
For more information about the response parameters, see the response parameters of the /api/v1/class/get API.
Request example
{
"id": "675e6783-0bac-4990-b6da-5aa8*****",
"user_id": "useridxxx"
"title": "Test update title",
"notice":"Test update classroom announcement",
"extends":"{}"
}Response example
For more information about the response example, see the response example of the /api/v1/class/get API.
Get co-streaming information
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/getMeetingInfo
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Sample value | Description | |||
id | String | Yes | classIdxxxx | The classroom ID. | |||
Return data
Name | Type | Example | Description | ||||
success | bool | true | Indicates whether the service succeeded. | ||||
data | members.user_id | String | paperclouds | The user ID of the co-streaming member. | |||
members.user_nick | String | paperclouds | The nickname of the co-streaming member. | ||||
members.user_avatar | String | https://img.xxxx | The profile picture of the co-streaming member. | ||||
members.camera_opened | String | true | The camera status of the co-streaming member. | ||||
members.mic_opened | String | true | The microphone status of the co-streaming member. | ||||
members.rtc_pull_url | String | artc://classxxxx | The co-streaming stream pulling URL. | ||||
Request example
{
"id": "675e6783-0bac-4990-b6da-*****"
}Response example
{
"success": true,
"data": {
"members": [
{
"user_id": "paperclouds",
"user_nick": "paperclouds",
"user_avatar": "https://img.alicdn.com/imgextra/i1/*******.png",
"camera_opened": true,
"mic_opened": true,
"rtc_pull_url": "artc://live.alixxx"
}
]
}
}Update co-streaming information
This API modifies the online co-streaming information and is typically called from the teacher's client.
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/updateMeetingInfo
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
id | String | Yes | classIdxxxx | The classroom ID. | |||
members | Array | Yes | The co-streaming members. | ||||
members | user_id | String | Yes | useridxxx | The user ID. | ||
user_nick | String | Yes | usernickxxx | The user nickname. | |||
user_avatar | String | Yes | http://xxx.jpg | The user's profile picture. | |||
camera_opened | Boolean | Yes | true | The camera status. | |||
mic_opened | Boolean | Yes | true | The microphone status. | |||
rtc_pull_url | String | Yes | artc://live.aliyun.com/play/xxxx | The co-streaming stream pulling URL. | |||
Returned Data
Name | Type | Example value | Description | ||||
success | Boolean | true | Indicates whether the operation is successful. | ||||
data | members.user_id | String | paperclouds | The user ID of the co-streaming member. | |||
members.user_nick | String | paperclouds | The nickname of the co-streaming member. | ||||
members.user_avatar | String | https://img.xxxx | The profile picture of the co-streaming member. | ||||
members.camera_opened | String | true | The camera status of the co-streaming member. | ||||
members.mic_opened | String | true | The microphone status of the co-streaming member. | ||||
members.rtc_pull_url | String | artc://classxxxx | The co-streaming stream pulling URL. | ||||
Request example
{
"id": "675e6783-0bac-4990-b6da-5aa89******",
"members":[
{
"user_id":"user_idxxx",
"user_nick":"user_idxxx",
"user_avatar":"user_idxxx",
"user_camera_opened": true,
"mic_opened": true,
"rtc_pull_url":"artc://live.alixxx"
}
]
}Response example
{
"success": true,
"data": {
"members": [
{
"user_id": "paperclouds",
"user_nick": "paperclouds",
"user_avatar": "https://img.alicdn.com/imgextra/i1/*****.png",
"camera_opened": true,
"mic_opened": true,
"rtc_pull_url": "artc://class.aliyun.com/play/*********"
}
]
}
}Get the whiteboard identity verification API
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/getWhiteboardAuthInfo
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
None.
Returned Data
Name | Type | Example | Description | ||||
success | Boolean | true | Indicates whether the operation was successful. | ||||
data | curTime | String | 1691650304 | The timestamp. | |||
checksum | String | 0ecf9cefxxxxxx | Required for server authentication. | ||||
nonce | String | 08318axxxxx | The random number. | ||||
Request example
None.
Response example
{
"success": true,
"data": {
"curTime": 1691650304,
"checksum": "0ecf9cefbf51439b9140948c6f******",
"nonce": "08318a2ea1124ff49*****"
}
}Add a courseware
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/addDoc
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
classId | String | Yes | classIdxxxx | The classroom ID. | |||
docId | String | Yes | docIdxxx | The courseware ID. | |||
serverType | String | Yes | NetEase | The whiteboard service provider. | |||
data | String | Yes | "{\"xx\":\"xxx\"}" | Detailed information about the courseware. | |||
Returned Data
Name | Type | Example | Description | ||||
success | bool | true | Indicates whether the operation was successful. | ||||
data | classId | String | class_id_xxxx | The classroom ID. | |||
docId | String | doc_id_xxxx | The courseware ID. | ||||
docInfos | String | "{\"xx\":\"xxx\"}" | Detailed information about the courseware. | ||||
createdAt | Date | 2023/08/08 09:53:15 | The creation time. | ||||
updateAt | Date | 2023/08/08 09:53:15 | The update time. | ||||
Request example
{
"classId": "class_id_11",
"docId": "doc_id_1",
"serverType": "NetEase",
"data": "{\"xx\":\"xxx\"}"
}Response example
{
"success": true,
"data": {
"classId": "class_id_11",
"docId": "doc_id_1",
"docInfos": "{\"xx\":\"xxx\"}",
"createdAt": "2023/08/08 09:53:15",
"updateAt": "2023/08/08 09:53:15"
}
}Delete a courseware
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/deleteDoc
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
classId | String | Yes | classIdxxxx | The classroom ID. | |||
docId | String | Yes | docIdxxx | The courseware ID. | |||
Returned data
Name | Type | Example | Description | ||||
success | bool | true | Indicates whether the operation was successful. | ||||
Request example
{
"classId": "class_id_11",
"docId": "doc_id_1",
}Response example
{
"success": true
}Query classroom courseware
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/queryDoc
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
classId | String | Yes | classIdxxxx | The classroom ID. | |||
Returned data
Name | Type | Example value | Description | ||||
success | bool | true | Indicates whether the operation was successful. | ||||
data | docInfos | Array | [{"createdAt": 1689585128000,},{},{}] | The list of courseware. | |||
Request example
{
"classId": "class_id_11"
}Response example
{
"success": true,
"data": [
{
"classId": "class_id_3",
"docId": "doc_id_1",
"serverType": "NetEase",
"docInfos": "{\"xx\":\"xxx\"}",
"createdAt": "2023/07/26 14:05:54"
},
{
"classId": "class_id_3",
"docId": "doc_id_2",
"serverType": "NetEase",
"docInfos": "{\"xx\":\"xxx\"}",
"createdAt": "2023/07/26 14:05:54"
},
{
"classId": "class_id_3",
"docId": "doc_id_3",
"serverType": "RongCloud",
"docInfos": "{\"xx\":\"xxx\"}",
"createdAt": "2023/07/26 14:05:54"
}
]
}Add courseware in batches
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/addDocs
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Sample value | Description | |||
classId | String | Yes | classIdxxxx | The classroom ID. | |||
docInfo | Array | Yes | [{"createdAt": 1689585128000,},{},{}] | You can add a list. | |||
Return data
Name | Type | Example value | Description | ||||
success | bool | true | Indicates whether the operation was successful. | ||||
data | classId | String | classIdxxxx | The classroom ID. | |||
docsInfoList | Array | [{"createdAt": 1689585128000,},{},{}] | The list of courseware information. | ||||
Request example
{
"classId": "class_id_3",
"docInfo": [
{
"docId": "doc_id_11",
"serverType": "NetEase",
"data": "{\"xx\":\"xxx\"}"
},
{
"docId": "doc_id_2",
"serverType": "NetEase",
"data": "{\"xx\":\"xxx\"}"
}
]
}Response example
{
"success": true,
"data": {
"classId": "class_id_3",
"docsInfoList": []
}
}Delete courseware in batches
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/deleteDocs
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
classId | String | Yes | classIdxxxx | The classroom ID. | |||
docIds | String | Yes | "doc_id_1,doc_id_2,doc_id_3" | A string of courseware IDs. | |||
Returned Data
Name | Type | Example | Description | ||||
success | bool | true | Indicates whether the operation was successful. | ||||
data | classId | String | classIdxxxx | The classroom ID. | |||
docsInfo | Array | [{"createdAt": 1689585128000,},{},{}] | The list of courseware information. | ||||
Request example
{
"classId": "class_id_3",
"docIds": "doc_id_1,doc_id_2,doc_id_3"
}Response example
{
"success": true,
"data": {
"docsInfo": [
{
"classId": "class_id_3",
"docId": "doc_id_1"
},
{
"classId": "class_id_3",
"docId": "doc_id_2"
},
{
"classId": "class_id_3",
"docId": "doc_id_3"
}
]
}
}Set teaching assistant permissions
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/setAssistantPermit
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
class_id | String | Yes | 89bdb7ab-7fa9-4061-8a73-c7c18a9c**** | The classroom ID. | |||
permit | JSON string | Yes | {\"is_ok\":\"false\"} | The permission information, customized by the frontend. | |||
Return data
Name | Type | Example | Description | ||||
success | Boolean | true | Indicates whether the operation succeeded. | ||||
data | class_id | String | 89bdb7ab-7fa9-4061-8a73-c7c18a9c**** | The classroom ID. | |||
permit | String | {\"is_ok\":\"false\"} | The permission information. | ||||
created_at | String | 2023/11/24 11:33:28 | The creation time. | ||||
updated_at | String | 2023/11/24 11:33:28 | The time of the last modification. | ||||
Request example
{
"class_id": "89bdb7ab-7fa9-4061-8a73-c7c18a9c****",
"permit": "{\"is_ok\":\"false\"}"
}Response example
{
"success": true,
"data": {
"permit": "{\"is_ok\":\"false\"}",
"class_id": "89bdb7ab-7fa9-4061-8a73-c7c18a9c****",
"created_at": "2023/11/24 11:33:28",
"updated_at": "2023/11/24 11:33:28"
}
}Delete teaching assistant permissions
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/deleteAssistantPermit
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example | Description | |||
class_id | String | Yes | 89bdb7ab-7fa9-4061-8a73-c7c18a9c**** | The classroom ID. | |||
Returned data
Name | Type | Example | Description | ||
success | Boolean | true | Indicates whether the operation was successful. | ||
Request example
{
"class_id": "89bdb7ab-7fa9-4061-8a73-c7c18a9c****"
}Response example
{
"success": true
}Get teaching assistant permissions
Usage notes
Request protocol: HTTP/HTTPS
Request path: /api/v1/class/getAssistantPermit
Authorization required: Yes
Request method: POST
Request Content-Type: JSON
Request parameters
Name | Type | Required | Example Value | Description | |||
class_id | String | Yes | 89bdb7ab-7fa9-4061-8a73-c7c18a9c**** | The classroom ID. | |||
Returned data
Name | Type | Example value | Description | ||||
success | Boolean | true | Indicates whether the operation is successful. | ||||
data | class_id | String | 89bdb7ab-7fa9-4061-8a73-c7c18a9c**** | The classroom ID. | |||
permit | String | {\"is_ok\":\"false\"} | The permission information. | ||||
created_at | String | 2023/11/24 11:33:28 | The creation time. | ||||
updated_at | String | 2023/11/24 11:33:28 | The update time. | ||||
Request example
{
"class_id": "89bdb7ab-7fa9-4061-8a73-c7c18a9c****"
}Response example
{
"success": true,
"data": {
"permit": "{\"is_ok\":\"false\"}",
"class_id": "89bdb7ab-7fa9-4061-8a73-c7c18a9c****",
"created_at": "2023/11/24 11:33:28",
"updated_at": "2023/11/24 11:33:28"
}
}