Classroom REST API

Updated

This page provides the API reference for the Agora Classroom REST API.

This page provides detailed help for the Flexible Classroom RESTful APIs.

Basic information

Server

All requests are sent to the host api.agora.io. See Ensure service reliability for alternate domain names.

Data format

The Content-Type of all requests is application/json.

Authentication

Flexible Classroom Cloud Service uses tokens for authentication. You need to put the corresponding information into the Authorization: agora token= field when sending your HTTP request. For details, see Secure authentication with tokens.

Create a classroom

Description

Call this method to create a classroom. After it is created, the classroom is reserved for five days.

Prototype

  • Method: POST
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUuid}

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins an RTC or RTM channel. The string length must be less than 64 characters. The following characters are supported:

  • All lowercase English letters: a to z.
  • All uppercase English letters: A to Z.
  • The numbers 0 to 9.
  • The space character.
  • The following special characters: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Request body parameters

Pass in the following parameters in the request body:

ParameterTypeDescription
roomTypeString

(Required) The type of the classroom. You can set the value to :

  • 0: One-to-one classroom.
  • 2: Lecture hall.
  • 4: Small classroom.
  • 10: Small cloud classroom.

Once set, this parameter value cannot be changed.

roomNameString(Required) The name of the classroom. The maximum length of this parameter is 64 characters.
roomPropertiesObject(Optional) The properties of the classroom. It includes the name of the room, room number whiteboard plug-in configuration, chat plug-in configuration, room opening, end time, duration, configuration of the number of people who raise their hands to connect to the microphone, the maximum number of people to connect to the microphone, and the switch status configuration of the device for students to join the room by default, etc.
roomProperties.scheduleObject(Optional) The schedule of the classroom.
roomProperties.schedule.startTimeInteger(Optional) The start timestamp (ms) of the class. Once set, this parameter value cannot be changed.
roomProperties.schedule.durationInteger(Optional) The duration of the class, in seconds. The maximum value is 86,400 seconds, and it is recommended to set it according to the actual duration of the class. If you set the class duration and dragging duration, when recording is turned on, the maximum recording time maxRecordingHour parameter will be set based on the sum of the two and rounded up. See Set the recording state.
roomProperties.schedule.closeDelayInteger(Optional) The delay of the class end time, in seconds. When the class duration ends, the class will enter the "End" state (state= 2). At this time, users can still enter and stay in the classroom normally. When the dragging time ends, the class will enter the "closed" state (state= 3) and all users will be kicked out.
roomProperties.processesObject(Optional) The process of inviting students to go "on the stage".
roomProperties.processes.handsUpObject(Optional) The settings of "on the stage".
roomProperties.processes.handsUp.maxAcceptInteger(Optional) The maximum number of students "on the stage".
roomProperties.processes.handsUp.defaultAcceptRoleString(Optional) The default user on the stage. If you hope to set the student on the stage, set it as "audience". If not, set it as "" or do not set this parameter. In the cloud classroom use-case, default is "".
roomProperties.flexPropsObject(Optional) The initial properties of the classroom. The user's backend can pass customized parameters to the room through this parameter. Users can set custom attributes for any classroom based on their own business needs. Flexible Classroom will synchronize changes in this attribute to all clients in the classroom to realize your own business expansion.
roomProperties.widgetsObject(Optional) Settings of the widgets in the classroom.
roomProperties.widgets.netlessBoardObject(Optional) Settings of the whiteboard widget in the classroom.
roomProperties.widgets.netlessBoard.stateInteger

(Optional) The state of the whiteboard widget in the classroom:

  • 0: Disabled.

  • 1: Enabled.

roomProperties.widgets.easemobIMObject(Optional) Settings of the chat widget in the classroom.
roomProperties.widgets.easemobIM.stateInteger

(Optional) The state of the chat widget in the classroom:

  • 0: Disabled.

  • 1: Enabled.

roleConfigObject(Optional) The role configuration.
roleConfig.2Object(Optional) The configuration of the student role.
roleConfig.2.limitInteger(Optional) The limit of the number of students.
roleConfig.2.defaultStreamObject(Optional) The default stream type of the student.
roleConfig.2.defaultStream.stateInteger

(Optional) The state of the default stream type of the student:

  • 0: Disabled.

  • 1: Enabled.

roleConfig.2.defaultStream.videoStateInteger

(Optional) The video state of the default stream of the student:

  • 0: Disabled.

  • 1: Enabled.

roleConfig.2.defaultStream.audioStateInteger

(Optional) The audio state of the default stream of the student:

  • 0: Disabled.

  • 1: Enabled.

To create a small cloud classroom, the following are the required parameters:

{
    ...
    "roomName":"{roomName}",
    "roomType":10,
    "roleConfig":{
        "2":{
            "defaultStream":{
                "audioState":1,
                "state":1,
                "videoState":1
            },
            "limit":49
        }
    },
  ...
}

Request example

curl -X POST 'https://api.agora.io/{region}/edu/apps/{YourAppId}/v2/rooms/test_room' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
    "roomName": "test_class",
    "roomType": 4,
    "roleConfig": {  // The audio and video permissions of students joining the room are turned on or off by default.(Optional)
        "2": {
            "limit": 50,
            "defaultStream": {
                "state": 1,
                "videoState": 1,
                "audioState": 1
            }
        }
    },
    "roomProperties": {
        "schedule": {
            "startTime": 1655452800000,
            "duration": 600,
            "closeDelay": 300
        },
        "processes": {
            "handsUp": {
                "maxAccept": 10, //The maximum number of students "on the stage".
                "defaultAcceptRole": "" //(Optional) The default user on the stage. If you hope to set the student on the stage, set it as "audience". If not, set is as "" or do not set this parameter.In cloud classroom Scenario  default is ""
            }
        },
        //The user's backend can pass customized parameters to the room through this parameter.Users can set custom attributes for any classroom based on their own business needs. Flexible Classroom will synchronize changes in this attribute to all clients in the classroom to realize your own business expansion.
        "flexProps": {
            "exampleKey": "exampleValue"
        },
        "widgets": {//The state of the widgets in the classroom : on or off
            "netlessBoard": {
                "state": 0
            },
            "easemobIM": {
                "state": 1
            }
        }
    }
}'

Response parameters

ParameterTypeDescription
codeInteger

Request status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringDetailed information about the code.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.

Response example

{
  "msg": "Success",
  "code": 0,
  "ts": 1610167740309
}

Note that you can just call the API to create a room, the server will respond with the 200 or 409. 200 means the room is created, 409 means the room has already been created and you can join the classroom.

Query a classroom

Description

Returns all information about the room object.

Prototype

  • Method: GET
  • Endpoint: {region}/edu/apps/{appId}/v2/rooms/{roomUuid}

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins an RTC or RTM channel. The string length must be less than 64 characters. The following characters are supported:

  • All lowercase English letters: a to z.
  • All uppercase English letters: A to Z.
  • The numbers 0 to 9.
  • The space character.
  • The following special characters: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Request example

curl -X GET 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \

Response parameters

ParameterTypeDescription
codeInteger

Request status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringDetailed information about the code.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.
dataObject

The returned object, which contains the following data:

  • roomUuid: String, room ID.
  • roomName: String, room name.
  • createTime: Integer, room creation timestamp.
  • roomProperties: Object, room attributes.
    • roomType: Integer, room type.
      • 0: 1 to 1.
      • 2: Large classroom.
      • 4: Small classroom.
      • 10: Small cloud classroom.
    • schedule: Object, lesson plan.
      • state: Integer, room state.
        • 0: Not started.
        • 1: Started.
        • 2: Ended.
        • 3: Closed.
      • startTime: Integer, starting time.
      • endTime: Integer, end time.
      • closeTime: Integer, closing time.
    • widgets: Object, component collection.
      • netlessBoard: Object, whiteboard component.
        • extra: Object, extended information.
          • boardAppId: String, whiteboard App ID.
          • boardId: String, whiteboard room ID.
          • boardToken: String, whiteboard room Token.
          • boardRegion: String, whiteboard area.
        • state: Integer, component state.
          • 0: Integer, not activated.
          • 1: Integer, activated.
      • easemobIM: Object, chat room component.
        • extra: Object, extended information.
          • orgName: String, organization name.
          • appName: String, app name.
          • chatRoomId: String, chat room ID.
          • appKey: String, app Key.
        • state: Integer, component state.
          • 0: Integer, not activated.
          • 1: Integer, activated.

Response example

{
    "msg": "Success",
    "code": 0,
    "ts": 1684231543281,
    "data": {
        "roomName": "jasoncai's Room",
        "roomUuid": "3579768dd1e1eec8522d3ed76992afd04",
        "scenario": "education",
        "roleConfig": {
        ...
        },
        "roomProperties": {
            "reward": {
            ...
            },
            "processes": {
                "handsUp": {
                ...
                },
                "openCamera": {
                ...
                },
                "remoteControl": {
                ...
                },
                "waveArm": {
                ...
                }
            },
            "im": {
                "huanxin": {
                ...
                }
            },
            "screen": {
            ...
            },
            "groups": {
            ...
            },
            "carousel": {
            ...
            },
            "widgets": {
                "netlessBoard": {
                    "extra": {
                    ...
                    },
                    "state": 1
                },
                "easemobIM": {
                    "extra": {
                    ...
                    }
                }
            },
            "schedule": {
                "closeDelay": 600,
                "duration": 1800
            },
            "webhookConfig": {
            ...
            },
            "record": {
            ...
            },
            "state": 0,
            "board": {
                "info": {
                ...
                }
            },
            "roomType": 4
        },
        "roomTemplate": "edu_medium_v1",
        "muteChat": {},
        "muteVideo": {},
        "muteAudio": {},
        "state": 0,
        "checkState": false,
        "createTime": 1683884683422
    }
}

Set the classroom state

Description

Call this method to set the classroom state: Not started, Started, Ended.

Prototype

  • Method: PUT
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/states/{state}

Request parameters

URL parameters

Pass the following parameter in the URL.

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z
  • All uppercase English letters: A to Z
  • All numeric characters: 0-9
  • The space character
  • "!", 1"#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
stateInteger

(Required) The classroom state:

  • 0: Not started.
  • 1: Started.
  • 2: Ended.
  • 3: The room is closed and users can no longer join the room.

Request example

curl -X PUT 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/states/1' \
-H 'Authorization: agora token={educationToken}' \

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.

Response example

"status": 200,
"body":
{
  "code": 0,
  "msg": "Success",
  "ts": 1610450153520
}

Update custom classroom properties

Description

Add or update the custom properties of a specified classroom.

Prototype

  • Method: PUT
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/properties

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Request body parameters

Pass in the following parameters in the request body.

ParameterTypeDescription
propertiesObjectClassroom properties.
roomProperties.examinationUrlString(Optional) The URL of the exam papers used in proctoring exam use-cases.
causeObjectThe update reason.

Request example

curl -X PUT 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/properties' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
  "properties": {
    "key1": "value1",
    "key2": "value2"
  },
  "cause": {}
}'

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.

Response example

{
  "msg": "Success",
  "code": 0,
  "ts": 1610167740309
}

Delete custom classroom properties

Description

Delete the custom properties of a specified classroom.

Prototype

  • Method: DELETE
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/properties

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Request body parameters

Pass in the following parameters in the request body.

ParameterTypeDescription
propertiesString arrayClassroom properties.
causeObjectReason for deletion.

Request example

Request Body

curl -X DELETE 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/properties' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
  "properties": ["key1", "key2"],
  "cause": {}
}'

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.

Response example

{
  "msg": "Success",
  "code": 0,
  "ts": 1610167740309
}

Create or remove breakout classrooms

Description

Create or remove breakout rooms. Breakout rooms are sessions that are split off from a classroom that allow students to discuss classwork in smaller groups.

Prototype

  • Method: PUT
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/groups/states/{state}

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) The Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
stateInteger

Whether to enable breakout rooms:

  • 1: Enabled. Set as this value if you want to create breakout rooms.
  • 0: Disabled. Set as this value if you want to remove breakout rooms.

Request body parameters

  • To create breakout rooms, you need to set state to 1 and pass in the following parameters in the request body.
  • To remove all breakout rooms, you need to set state to 0 and leave the request body blank.
ParameterTypeDescription
groupsArray

(Required) The breakout rooms to be created. This parameter consists of the following parameters:

  • groupUuid: (Optional) The ID of the breakout room, string type. If you do not provide an ID, an ID is automatically assigned to the breakout room.
  • groupName: (Optional) The name of the breakout room, string type.
  • users: (Required) The user list in the breakout room, array type. This parameter consists of the following parameters:
    • userUuid: (Required) The user ID. This is the unique identifier of the user when logging in to Signaling. The string length must be less than 64 characters.

Request example

curl -X PUT 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/states/1' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
    "groups":[
        {
            "groupUuid": "group1",
            "groupName":"Group 01",
            "users":[{
                "userUuid": "user1"
            }]
        }
    ]
}'

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.

Response example

{
  "msg": "Success",
  "code": 0,
  "ts": 1610167740309
}

Set the recording state

Description

Call this method to start or stop recording a specified classroom.

Prototype

  • Method: PUT
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/records/states/{state}

Request parameters

URL parameters

Pass the following parameter in the URL.

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
stateInteger

(Required) The recording state:

  • 0: Stop recording.
  • 1: Started.

Request body parameters

Pass in the following parameters in the request body.

ParameterTypeDescription
modeString

(Optional) The recording mode:

  • Set this parameter as web to enable web page recording mode. The format of recorded files is MP4. When the length of the recorded file reaches around two hours, or when the size of the file exceeds around 2 GB, the recording service automatically creates another MP4 file.
  • If you do not set this parameter, Flexible Classroom records the audio and video of the teachers in composite recording mode by default. The format of recorded files is M3U8 and TS.
webRecordConfigObject

(Optional) When the mode is set as web, you need to set the detailed configuration of the web page recording through webRecordConfig, including the following fields:

  • rootUrl: (Required) String, the root address of the web page to be recorded. During the recording, Agora Edu Cloud Service automatically gets the full address of the web page to be recorded by putting rootUrl, roomUuid, roomType, and other parameters together. If you set both url and rootUrl, url overrides rootUrl.
  • publishRtmp: (Optional) Whether to push the recorded webpage to CDN:
    • true: Yes.
    • false: No.
  • onhold: (Required) Boolean. You can set this parameter as:
    • true: Pauses recording immediately after the web page recording task is enabled. The recording service opens and renders the web page to be recorded, but does not generate a slice file.
    • false: (Default) Enables the web page recording task and starts recording.
  • videoBitrate: (Optional) Number. The bitrate of the video (Kbps). The value range is [50, 8000]. The default value of videoBitrate varies according to the resolution of the output video:
    • If the resolution of the output video is less than 1280 × 720, the default value of videoBitrate is 1500.
    • If the resolution of the output video is greater than or equal to 1280 × 720, the default value of videoBitrate is 2000.
  • videoFps: (Optional) Number. The frame rate of the video (fps). The value range is [5, 60]. The default value is 15.
  • audioProfile: (Optional) Number. The sample rate, encoding mode, number of audio channels, and bitrate.
    • 0: (Default) Sample rate of 48 kHz, music encoding, mono, and a bitrate of up to 48 Kbps.
    • 1: Sample rate of 48 kHz, music encoding, mono, and a bitrate of up to 128 Kbps.
    • 2: Sample rate of 48 kHz, music encoding, stereo, and a bitrate of up to 192 Kbps.
  • videoWidth: Number. The width of the video (pixels). The value range is [480, 1280]. The default value is 1280. The product of videoWidth and videoHeight should not exceed 921,600 (1280 × 720).
  • videoHeight: Number. The height of the video (pixels). The value range is [480, 1280]. The default value is 720. The product of videoWidth and videoHeight should not exceed 921,600 (1280 × 720).
  • maxRecordingHour: Number, the maximum recording length (hours). The value range is [1,720]. If you set the class duration, Agora Edu Cloud Service gets the maximum recording length by rounding up the class duration. For example, if the class duration is 1800 seconds, maxRecordingHour is one hour. If you do not set the class duration, the default value of maxRecordingHour is two hours. If the limit set by maxRecordingHour is exceeded, the recording stops automatically.
retryTimeoutNumberThe amount of time (seconds) that the Flexible Classroom cloud service waits between tries. The Flexible Classroom cloud service reties twice at most.

Request example

curl -X PUT 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/records/states/1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
    "mode": "web",
    "webRecordConfig": {
        "url": "https://webdemo.agora.io/xxxxx/?userUuid={recorder_id}&roomUuid={room_id_to_be_recorded}&roleType=0&roomType=4&pretest=false&rtmToken={recorder_token}&language=en&appId={your_app_id}",
        "rootUrl": "https://xxx.yyy.zzz",
        "publishRtmp": "true"
    },
    "retryTimeout": 60
}'

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.
dataObject

The returned object, which contains the following data:

  • recordId: String. The unique identifier of the recording.
  • sid: String. The sid of cloud recording.
  • resourceId: String. The resourceId of cloud recording.
  • state: Integer. The recording state: 0: The recording ends. 1: The recording begins.
  • startTime: Integer. The timestamp (ms) when the recording begins.
  • streamingUrl: Object. The URL address of pulling the CDN stream: rtmp: String. The URL of the RTMP streaming. flv: String. The URL of the FLV streaming. hls: String. The URL of the HLS streaming.

Response example

"status": 200,
"body":
{
    "code": 0,
    "ts": 1610450153520,
    "streamingUrl": {
            "rtmp": "",
            "flv": "",
            "hls": ""
        }
}

Update the recording configurations

Description

Call this method during the recording to update the recording configurations. Every time this method is called, the previous configurations are overwritten.

Prototype

  • Method: PATCH
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/records/states/{state}

Request parameters

URL parameters

Pass the following parameter in the URL.

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Request body parameters

Pass in the following parameters in the request body.

ParameterTypeDescription
webRecordConfigObject

(Optional) Recording configurations:

  • onhold: (Required) Boolean. You can set this parameter as:
    • true: Pauses the web page recording. The recording service no longer generates any slice file.
    • false: (Default) Continues the web page recording. After the recording is paused, you can call this method and set the onhold parameter as false to continue the web page recording.

Request example

curl -X PATCH 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/records/states/1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
    "webRecordConfig": {
        "onhold": false
    }
}'

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.

Response example

"status": 200,
"body":
{
    "code": 0,
    "ts": 1610450153520
}

Get the recording list

Description

Get the recording list in a specified classroom.

You can fetch data in batches with the nextId parameter. You can get up to 100 pieces of data for each batch.

Prototype

  • Method: GET
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/records

Request parameters

URL parameters

Pass the following parameter in the URL.

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Query parameters

ParameterTypeDescription
nextIdString(Optional) The starting ID of the next batch of data. When you call this method to get the data for the first time, leave this parameter empty or set it as null. Afterward, you can set this parameter as the nextId that you get in the response of the previous method call.

Request example

curl -X PATCH 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/records/states/1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
    "webRecordConfig": {
        "onhold": false
    }
}'

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.
dataObject

Include the following parameters:

  • count: Integer, the number of pieces of data in this batch.
  • list: JSONArray. An array of the recording list. A JSON object includes the following parameters:
    • appId: Your Agora App ID.
    • roomUuid: The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel.
    • recordId: The unique identifier of a recording session. A recording session starts when you call a method to start recording and ends when you call this method to stop recording.
    • startTime: The UTC timestamp when a recording session starts, in milliseconds.
    • endTime: The UTC timestamp when a recording session ends, in milliseconds.
    • resourceId: The resourceId of the Agora Cloud Recording service.
    • sid: The sid of the Agora Cloud Recording service.
    • recordUid: The UID used by the Agora Cloud Recording service in the channel.
    • boardAppId: The App Identifier of the Agora Interactive Whiteboard service.
    • boardToken: The SDK Token of the Agora Interactive Whiteboard service.
    • boardId: The unique identifier of a whiteboard session.
    • type: Integer, the recording type:
      • 3: Web Page Recording
    • status: Integer, the recording state:
      • 1: In recording.
      • 2: Recording has ended.
    • url: String, the URL address of the recorded files in composite recording mode.
    • recordDetails: JSONArray. The JSON object contains the following fields:
      • url: String, the URL address of the recorded files in web page recording mode.
    • nextId: String, the starting ID of the next batch of data. If it is null, there is no next batch of data. If it is not null, use this nextId to continue the query until null is reported.
    • total: Integer, the total number of pieces of data.
    • unready: Boolean. true means that recording fails.
  • webRecordingUrlQuery: String. Same as query in webpage recording.

Response example

{
   "msg":"Success",
   "code":0,
   "ts":1706091167911,
   "data":{
      "total":1,
      "list":[
         {
            "recordId":"sssssssssss",
            "appId":"sssssssssss",
            "roomUuid":"sssssssssss",
            "startTime":1706079930586,
            "endTime":1706081355989,
            "resourceId":"443322222",
            "sid":"sssssssssss",
            "recordUid":"sssssssssss",
            "type":3,
            "status":2,
            "url":"https://xxxxxxxx.m3u8",
            "recordDetails":[
               {
                  "url":"xxxxxxxxx.mp4"
               }
            ],
            "webRecordUrlQuery":"xxxxxxx"
         }
      ],
      "count":1
   }
}

Query a specific user

Prototype

  • Method: GET
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUuid}/users/{userUuid}

Request parameters

URL parameters

Pass the following parameter in the URL.

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.

  • ap: Asia Pacific.

  • eu: Europe.

  • na: North America.

appIdString(Required) Agora App ID.
roomUUidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins an RTC or RTM channel. The string length must be less than 64 characters. The following characters are supported:

  • All lowercase English letters: a to z.
  • All uppercase English letters: A to Z.
  • The numbers 0 to 9.
  • The space character.
  • The following special characters: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
userUuidString

(Required) The user ID. This is the unique identifier of the user and also the user ID used when logging in to Signaling. The string length must be less than 64 characters. Supported character scopes are:

  • All lowercase English letters: a to z.

All numeric characters.

  • 0-9

  • The space character.

  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Request example

curl -X GET 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/users/test_user' \
-H 'Authorization: agora token={educationToken}' \

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.

  • Non-zero: The request fails.

msgStringThe detailed information.
dataObject

Include the following parameters:

  • userUuid: String, the user ID.
  • userName: String, the user name.
  • role: Integer. The user role. This parameter can be set as one of the following values:
    • 1: Teacher.
    • 2: Student.
    • 3: Teaching assistant.
  • streamUuid: String. The ID of the stream, which is also the uid used when joining an RTC SDK channel.
  • state: Whether the user is online:
    • 0: Offline.
    • 1: Online.
  • userProperties: Object. The user property.
  • updateTime: Number. The time when the user status is updated, Unix timestamp (in milliseconds), UTC time.

Response example

{
  "msg": "Success",
  "code": 0,
  "ts": 1658126805245,
  "data": {
    "userName": "jasoncai",
    "userUuid": "681d9aca4924e9a84ad301e8cca438a71",
    "role": "1",
    "userProperties": {},
    "updateTime": 1658126782174,
    "streamUuid": "1417753684",
    "state": 1
  }
}

Update custom user properties

Description

Add or update the custom properties of a specified user.

Prototype

  • Method: PUT
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/users/{userUuid}/properties

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
userUuidString

(Required) The user ID. This is the unique identifier of the user when logging in to Signaling. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Request body parameters

Pass in the following parameters in the request body.

ParameterTypeDescription
propertiesObjectThe user properties.
causeObjectThe update reason.

Request example

curl -X PUT 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/users/test_user/properties' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
  "properties": {
    "key1": "value1",
    "key2": "value2"
  },
  "cause": {}
}'

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.

Response example

{
  "msg": "Success",
  "code": 0,
  "ts": 1610167740309
}

Delete custom user properties

Description

Delete the custom properties of a specified user.

Prototype

  • Method: DELETE
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/users/{userUuid}/properties

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
userUuidString

(Required) The user ID. This is the unique identifier of the user when logging in to Signaling. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Request body parameters

Pass in the following parameters in the request body.

ParameterTypeDescription
propertiesString arrayThe user properties.
causeObjectReason for deletion.

Request example

curl -X DELETE 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/users/test_user/properties' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
  "properties": ["key1", "key2"],
  "cause": {}
}'

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.

Response example

{
  "msg": "Success",
  "code": 0,
  "ts": 1610167740309
}

Kick a user out of a classroom

Description

Call this method to kick a specified user out of a classroom. After a successful method call, the server triggers an event indicating a user leaves the classroom. You can use the dirty parameter to determine whether the user can enter the classroom afterwards.

Prototype

  • Method: POST
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/users/{userUuid}/exit

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","
userUuidString

(Required) The user ID. This is the unique identifier of the user when logging in to Signaling. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Request body parameters

Pass in the following parameters in the request body.

ParameterTypeDescription
dirtyObject

(Optional) The user privilege:

  • state: Boolean, whether the user is dirty:
    • 1: Dirty. A dirty user cannot enter the classroom.
    • 0: Not dirty.
  • duration: Number, the duration of the dirty state (seconds), starting from the time when the user is kicked out of the classroom.

Request example

curl -X POST 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/users/test_user/exit' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Authorization: agora token={educationToken}' \
--data-raw '{
  "dirty": {
    "state": 1,
    "duration": 600
  }
}'

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.

Response example

{
  "msg": "Success",
  "code": 0,
  "ts": 1610167740309
}

Query a specified event

Description

Query a specified type of event in a specified classroom.

You can fetch data in batches with the nextId parameter. You can get up to 100 pieces of data for each batch.

  • You can query the same event repeatedly.
  • You cannot query events in a destroyed classroom. A classroom is destroyed automatically one hour after it is ended.

Prototype

  • Method: GET
  • Endpoint: /{region}/edu/apps/{appId}/v2/rooms/{roomUUid}/sequences

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString

(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters. The following character sets are supported:

  • All lowercase English letters: a to z.
  • All numeric characters: 0-9
  • The space character.
  • "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", "{", "}", "|", "~", ","

Query parameters

ParameterTypeDescription
nextIdString(Optional) The starting ID of the next batch of data. When you call this method to get the data for the first time, leave this parameter empty or set it as null. Afterward, you can set this parameter as the nextId that you get in the response of the previous method call.
cmdInteger(Optional) Event type. For details, see Flexible Classroom Cloud Service Events.

Request example

curl -X GET 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/sequences?cmd=20' \
-H 'Authorization: agora token={educationToken}' \

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.
dataObject

Include the following parameters:

  • total: Integer, the total number of pieces of data.

  • count: Integer, the number of pieces of data in this batch.

  • list: JSONArray. An array of the recording list. A JSON object includes the following parameters:

  • nextId: String, the starting ID of the next batch of data. If it is null, there is no next batch of data. If it is not null, use this nextId to continue the query until null is reported.

Response example

{
  "msg": "Success",
  "code": 0,
  "ts": 1610433913533,
  "data": {
    "total": 1,
    "list": [
      {
        "roomUuid": "",
        "cmd": 20,
        "sequence": 1,
        "version": 1,
        "data": {}
      }
    ],
    "nextId": null,
    "count": 1
  }
}

Get all classroom events

Description

Get all events in the classrooms associated with a specified App ID.

You can call this method at regular intervals to listen for all the events that occur in the flexible classrooms.

  • Each event can only be obtained once.
  • You cannot get events one hour after a classroom is destroyed.

Prototype

  • Method: GET
  • Endpoint: /{region}/edu/polling/apps/{appId}/v2/rooms/sequences

Request parameters

URL parameters

Pass the following parameter in the URL.

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.

Request example

curl -X GET 'https://api.sd-rtn.com/{region}/edu/polling/apps/{yourAppId}/v2/rooms/sequences' \
-H 'Authorization: agora token={educationToken}' \

Response parameters

ParameterTypeDescription
codeInteger

Business status code:

  • 0: The request succeeds.
  • Non-zero: The request fails.
msgStringThe detailed information.
tsNumberThe current Unix timestamp (in milliseconds) of the server in UTC.
dataObject

Include the following parameters:

  • roomUuid: String, the classroom ID.
  • cmd: Integer, the event type. For details, see Flexible Classroom Cloud Service Events.
  • sequence: Integer. The event ID. This is the unique identifier of an event, which is automatically generated to ensure the order of events.
  • version: Integer, the service version.
  • data: Object, the detailed data of the event. The data varies depending on the event type. For details, see Flexible Classroom Cloud Service Events.

Response example

"status": 200,
"body":
{
    "msg": "Success",
    "code": 0,
    "ts": 1610167740309,
    "data":[
        {
            "roomUuid": "xxxxxx",
            "cmd": 20,
            "sequence": 1,
            "version": 1,
            "data":{}
        }
    ]
}

Get data for pop-up quizzes

Prototype

  • Method: GET
  • Request path: /edu/apps/{appId}/v2/rooms/{roomUUid}/widgets/popupQuiz/sequences

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters.

Query parameters

ParameterTypeDescription
nextIdString(Optional) The starting ID of the next batch of data. When you call this method to get the data for the first time, leave this parameter empty or set it as null. Afterward, you can set this parameter as the nextId that you get in the response of the previous method call.
countInteger(Optional) The number of pieces of data in this batch. The default value is 100.

Request example

curl -X GET 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/widgets/popupQuiz/sequences' \
-H 'Authorization: agora token={educationToken}' \

Response parameters

The fields returned in data vary in different situations.

  • After the teacher clicks the Start button to start a quiz, the summarized data of the Pop-up Quiz widget updates. data contains the following fields:

    Field nameTypeDescription
    actionIntegerThe action type
    widgetUuidStringThe widget ID
    changePropertiesObjectThe changed properties
    changeProperties.extraObjectThe extra information of the changed properties
    changeProperties.extra.correctItemsObject[]The correct choice
    changeProperties.extra.correctCountIntegerThe number of students who have made the correct choice
    changeProperties.extra.answerStateInteger

    The status of this quiz:

    • 1 : In progress
    • 0: Ended
    changeProperties.extra.receiveQuestionTimeLongThe time when the students receive the question
    changeProperties.extra.popupQuizIdStringThe question ID
    changeProperties.extra.averageAccuracyFloatThe rate at which the correct choice is made for this question
    changeProperties.extra.totalCountIntegerThe total number of students who have submitted their answers to this question
    changeProperties.extra.itemsObject[]The options of this question
    changeProperties.stateInteger

    The state of the Pop-up Quiz widget:

    • 0: Inactive
    • 1: Active
    causeStringThe reason for the property change
    cause.popQuizIdStringThe Pop-up Quiz ID
    cause.actionInteger

    The action type:

    • 1: The teacher starts taking the quiz
    • 2: The teacher finishes taking the quiz
    • 3: The student hands over the answer
    • 4: The information is updated
    operatorObjectThe operator of the property change
    operator.userUuidStringThe ID of the operator
    operator.userNameStringThe name of the operator
    operator.roleStringThe role of the operator
  • After a student submits the answer, the student's data updates. data contains the following fields:

    Field nameTypeDescription
    actionIntegerThe action type
    widgetUuidStringThe widget ID
    changePropertiesObjectThe changed properties
    changeProperties.lastCommitTimeLongThe last submit time
    changeProperties.popupQuizIdStringThe question ID
    changeProperties.selectedItemsObject[]The answer submitted by this student
    changeProperties.isCorrectBooleanWhether the answer submitted by the student is correct
    causeStringThe reason for the property change
    cause.popQuizIdStringThe Pop-up Quiz ID
    cause.actionInteger

    The action type:

    • 1: The teacher starts taking the quiz
    • 2: The teacher finishes taking the quiz
    • 3: The student hands over the answer
    • 4: The information is updated
    operatorObjectThe operator of the property change
    operator.userUuidStringThe ID of the operator
    operator.userNameStringThe name of the operator
    operator.roleStringThe role of the operator
    fromUserObjectThe user who starts this quiz
    fromUser.userUuidStringThe ID of the user who starts this quiz
    fromUser.userNameStringThe name of the user who starts this quiz
    fromUser.roleStringThe role of the user who starts this quiz
  • After a student submits the answer, the summarized data of the Pop-up Quiz widget updates. data contains the following fields:

    Field nameTypeDescription
    actionIntegerThe action type
    widgetUuidStringThe widget ID
    changePropertiesObjectThe changed properties
    changeProperties.extraObjectThe extra information of the changed properties
    changeProperties.extra.selectedCountIntegerThe number of students who have submitted their answers
    changeProperties.extra.correctCountIntegerThe number of students who have made the correct choice
    changeProperties.extra.averageAccuracyFloatThe rate at which the correct choice is made for this question
    changeProperties.extra.totalCountIntegerThe total number of students who have submitted their answers to this question
    causeStringThe reason for the property change
    cause.popQuizIdStringThe Pop-up Quiz ID
    cause.actionInteger

    The action type:

    • 1: The teacher starts taking the quiz
    • 2: The teacher finishes taking the quiz
    • 3: The student hands over the answer
    • 4: The information is updated
    operatorObjectThe operator of the property change
    operator.userUuidStringThe ID of the operator
    operator.userNameStringThe name of the operator
    operator.roleStringThe role of the operator
  • After the teacher ends the quiz, the summarized data of the Pop-up Quiz widget updates. data contains the following fields:

    Field nameTypeDescription
    actionIntegerThe action type
    widgetUuidStringThe widget ID
    changePropertiesObjectThe changed properties
    changeProperties.extraObjectThe extra information of the changed properties
    changeProperties.extra.selectedCountIntegerThe number of students who have submitted their answers
    changeProperties.extra.correctCountIntegerThe number of students who have made the correct choice
    changeProperties.extra.answerStateInteger

    The status of this quiz:

    • 1 : In progress
    • 0: Ended
    changeProperties.extra.averageAccuracyFloatThe rate at which the correct choice is made for this question
    changeProperties.extra.totalCountIntegerThe total number of students who have submitted their answers to this question
    causeStringThe reason for the property change
    cause.popQuizIdStringThe Pop-up Quiz ID
    cause.actionInteger

    The action type:

    • 1: The teacher starts taking the quiz
    • 2: The teacher finishes taking the quiz
    • 3: The student hands over the answer
    • 4: The information is updated
    operatorObjectThe operator of the property change
    operator.userUuidStringThe ID of the operator
    operator.userNameStringThe name of the operator
    operator.roleStringThe role of the operator

Response example

  • After the teacher clicks the Start button to start a quiz, the summarized data of the Pop-up Quiz widget updates:

    "action": NumberInt("1"),
    "changeProperties": {
        "extra.correctItems": [
            "A",
            "B",
            "D"
        ],
        "extra.totalCount": NumberInt("1"),
        "extra.answerState": NumberInt("1"),
        "state": NumberInt("1"),
        "extra.popupQuizId": "ab5b183238a74d5a9c955dc87c6397e0",
        "extra.averageAccuracy": 0,
        "extra.correctCount": NumberInt("0"),
        "extra.items": [
            "A",
            "C",
            "B"
        ],
        "extra.receiveQuestionTime": NumberLong("1652413962895")
    },
    "operator": {
        "userName": "server",
        "userUuid": "server",
        "role": "server"
    }
  • After a student submits the answer, the student's data updates:

    "action": NumberInt("1"),
    "changeProperties": {
        "selectedItems": [
            "A",
            "B",
            "D"
        ],
        "isCorrect": true,
        "popupQuizId": "ab5b183238a74d5a9c955dc87c6397e0",
        "lastCommitTime": NumberLong("1652413989997")
    },
    "fromUser": {
        "userName": "yerongzhe2",
        "userUuid": "yerongzhe22",
        "role": "audience"
    }
  • After the teacher ends the quiz, the summarized data of the Pop-up Quiz widget updates:

    "action": NumberInt("1"),
    "changeProperties": {
        "extra.totalCount": NumberInt("1"),
        "extra.answerState": NumberInt("0"),
        "extra.selectedCount": NumberInt("1"),
        "extra.averageAccuracy": 1,
        "extra.correctCount": NumberInt("1")
    },
    "operator": {
        "userName": "server",
        "userUuid": "server",
        "role": "server"
    }

Get data for polls

Prototype

  • Method: GET
  • Request path: /edu/apps/{appId}/v2/rooms/{roomUUid}/widgets/poll/sequences

Request parameters

URL parameters

Pass the following parameters in the URL:

ParameterTypeDescription
regionString

(Required) The region for connection. For details, see Network geofencing. Flexible Classroom supports the following regions:

  • cn: Mainland China.
  • ap: Asia Pacific.
  • eu: Europe.
  • na: North America.
appIdString(Required) Agora App ID.
roomUuidString(Required) The classroom ID. This is the globally unique identifier of a classroom. It is also used as the channel name when a user joins a channel. The string length must be less than 64 characters.

Query parameters

ParameterTypeDescription
nextIdString(Optional) The starting ID of the next batch of data. When you call this method to get the data for the first time, leave this parameter empty or set it as null. Afterward, you can set this parameter as the nextId that you get in the response of the previous method call.
countInteger(Optional) The number of pieces of data in this batch. The default value is 100.

Request example

curl -X GET 'https://api.sd-rtn.com/{region}/edu/apps/{yourAppId}/v2/rooms/test_class/widgets/popupQuiz/sequences' \
-H 'Authorization: agora token={educationToken}' \

Response parameters

The fields returned in data vary in different situations.

  • After the teacher clicks the Start button to start a poll, the summarized data of the Polling widget updates. data contains the following fields:

    Field nameTypeDescription
    actionIntegerThe action type
    widgetUuidStringThe widget ID
    changePropertiesObjectThe changed properties
    changeProperties.extraObjectThe extra information of the changed properties
    changeProperties.extra.modeInteger

    The polling mode:

    • 1: Single-choice
    • 2: Multiple-choice
    changeProperties.extra.pollingStateInteger

    The status of this poll:

    • 1 : In progress
    • 0: Ended
    changeProperties.extra.pollDetailsMap<String, Object>The polling results. key is the option index, starting from 0.
    changeProperties.extra.pollDetails.numIntegerThe number of students who have selected this option
    changeProperties.extra.pollDetails.percentageFloatThe percentage of students who have selected this option in students who have submitted their choices
    changeProperties.extra.pollIdStringThe poll ID
    changeProperties.extra.pollItemsObjectThe option content
    changeProperties.stateInteger

    The state of the Polling widget:

    • 0: Inactive
    • 1: Active
    causeStringThe reason for the property change
    cause.popQuizIdStringThe Pop-up Quiz ID
    cause.actionInteger

    The action type:

    • 1: The teacher starts taking the quiz
    • 2: The teacher finishes taking the quiz
    • 3: The student hands over the answer
    • 4: The information is updated
    operatorObjectThe operator of the property change
    operator.userUuidStringThe ID of the operator
    operator.userNameStringThe name of the operator
    operator.roleStringThe role of the operator
  • After a student submits the choice, the student's data updates. data contains the following fields:

    Field nameTypeDescription
    actionIntegerThe action type
    widgetUuidStringThe widget ID
    changePropertiesObjectThe changed properties
    changeProperties.extraObjectThe extra information of the changed properties
    changeProperties.extra.pollIdStringThe poll ID
    changeProperties.extra.selectIndexObject[]The index of the option selected by this student
    causeStringThe reason for the property change
    cause.popQuizIdStringThe Pop-up Quiz ID
    cause.actionInteger

    The action type:

    • 1: The teacher starts taking the quiz
    • 2: The teacher finishes taking the quiz
    • 3: The student hands over the answer
    • 4: The information is updated
    operatorObjectThe operator of the property change
    operator.userUuidStringThe ID of the operator
    operator.userNameStringThe name of the operator
    operator.roleStringThe role of the operator
    fromUserObjectThe user who starts this poll
    fromUser.userUuidStringThe ID of the user who starts this poll
    fromUser.userNameStringThe name of the user who starts this poll
    fromUser.roleStringThe role of the user who starts this poll
  • After a student submits the answer, the summarized data of the Polling widget updates. data contains the following fields:

    Field nameTypeDescription
    actionIntegerThe action type
    widgetUuidStringThe widget ID
    changePropertiesObjectThe changed properties
    changeProperties.extraObjectThe extra information of the changed properties
    changeProperties.extra.pollDetailsMap<String, Object>The polling results. key is the option index, starting from 0.
    changeProperties.extra.pollDetails.numIntegerThe number of students who have selected this option
    changeProperties.extra.pollDetails.percentageFloatThe percentage of students who have selected this option in students who have submitted their choices
    changeProperties.extra.pollIdStringThe poll ID
    causeStringThe reason for the property change
    cause.popQuizIdStringThe Pop-up Quiz ID
    cause.actionInteger

    The action type:

    • 1: The teacher starts taking the quiz
    • 2: The teacher finishes taking the quiz
    • 3: The student hands over the answer
    • 4: The information is updated
    operatorObjectThe operator of the property change
    operator.userUuidStringThe ID of the operator
    operator.userNameStringThe name of the operator
    operator.roleStringThe role of the operator
    fromUserObjectThe user who starts this poll
    fromUser.userUuidStringThe ID of the user who starts this poll
    fromUser.userNameStringThe name of the user who starts this poll
    fromUser.roleStringThe role of the user who starts this poll
  • After the teacher ends the poll, the summarized data of the Polling widget updates. data contains the following fields:

    Field nameTypeDescription
    actionIntegerThe action type
    widgetUuidStringThe widget ID
    changePropertiesObjectThe changed properties
    changeProperties.extraObjectThe extra information of the changed properties
    changeProperties.extra.pollingStateInteger

    The status of this poll:

    • 1 : In progress
    • 0: Ended
    changeProperties.extra.pollDetailsMap<String, Object>The polling results. key is the option index, starting from 0.
    changeProperties.extra.pollDetails.numIntegerThe number of students who have selected this option
    changeProperties.extra.pollDetails.percentageFloatThe percentage of students who have selected this option in students who have submitted their choices
    changeProperties.extra.pollIdStringThe poll ID
    causeStringThe reason for the property change
    operatorObjectThe operator of the property change
    operator.userUuidStringThe ID of the operator
    operator.userNameStringThe name of the operator
    operator.roleStringThe role of the operator
    fromUserObjectThe user who starts this poll
    fromUser.userUuidStringThe ID of the user who starts this poll
    fromUser.userNameStringThe name of the user who starts this poll
    fromUser.roleStringThe role of the user who starts this poll

Response example

  • After the teacher clicks the Start button to start a poll, the summarized data of the Polling widget updates:

    "action": NumberInt("1"),
    "changeProperties": {
        "extra.pollId": "e556ce3df5cd4c23941b03bf54d29ba3",
        "extra.pollState": NumberInt("1"),
        "extra.pollItems": [
            "aaa",
            "bbb",
            "ccc",
            "ddd",
            "eee"
        ],
        "extra.mode": NumberInt("2"),
        "state": NumberInt("1"),
        "extra.pollDetails": {
            "0": {
                "num": NumberInt("0"),
                "percentage": 0
            },
            "1": {
                "num": NumberInt("0"),
                "percentage": 0
            },
            "2": {
                "num": NumberInt("0"),
                "percentage": 0
            },
            "3": {
                "num": NumberInt("0"),
                "percentage": 0
            },
            "4": {
                "num": NumberInt("0"),
                "percentage": 0
            }
        }
    },
    "operator": {
        "userName": "server",
        "userUuid": "server",
        "role": "server"
    }
  • After a student submits the choice, the student's data updates:

    "action": NumberInt("1"),
    "changeProperties": {
        "pollId": "e556ce3df5cd4c23941b03bf54d29ba3",
        "selectIndex": [
            NumberInt("1"),
            NumberInt("2"),
            NumberInt("4")
        ]
    },
    "fromUser": {
        "userName": "yerongzhe2",
        "userUuid": "yerongzhe22",
        "role": "audience"
    },
    "operator": {
        "userName": "server",
        "userUuid": "server",
        "role": "server"
    }
  • After a student submits the choice, the summarized data of the Polling widget updates:

    "action": NumberInt("1"),
    "changeProperties": {
        "extra.pollId": "2f38e6de32064713adf135de41c963df",
        "extra.pollDetails": {
            "0": {
                "num": NumberInt("1"),
                "percentage": 0.33333334
            },
            "1": {
                "num": NumberInt("3"),
                "percentage": 1
            },
            "2": {
                "num": NumberInt("3"),
                "percentage": 1
            },
            "3": {
                "num": NumberInt("0"),
                "percentage": 0
            },
            "4": {
                "num": NumberInt("2"),
                "percentage": 0.6666667
            }
        }
    },
    "operator": {
        "userName": "server",
        "userUuid": "server",
        "role": "server"
    }
  • After the teacher ends the poll, the summarized data of the Polling widget updates:

    "action": NumberInt("1"),
    "changeProperties": {
        "extra.pollId": "2f38e6de32064713adf135de41c963df",
        "extra.pollDetails": {
            "0": {
                "num": NumberInt("1"),
                "percentage": 0.33333334
            },
            "1": {
                "num": NumberInt("3"),
                "percentage": 1
            },
            "2": {
                "num": NumberInt("3"),
                "percentage": 1
            },
            "3": {
                "num": NumberInt("0"),
                "percentage": 0
            },
            "4": {
                "num": NumberInt("2"),
                "percentage": 0.6666667
            }
        }
    },
    "operator": {
        "userName": "server",
        "userUuid": "server",
        "role": "server"
    }

Status code

Response status codeBusiness status codeDescription
2000The request succeeds.
400400The request parameter is incorrect.
401N/A

Possible reasons:

  • The App ID is invalid.
  • Unauthorized. Incorrect x-agora-uid or x-agora-token.
40330403200The classroom is muted globally. Users cannot send chat messages.
404N/AThe server cannot find the requested resource.
40420404100The classroom does not exist.
40420404200The user does not exist.
40930409410The recording has not been started.
40930409411The recording has not been ended.
40930409100The class has been started.
40930409101The class has been ended.
500500The server has an internal error and cannot process the request.
503N/AInternal server error. The gateway or proxy server does not receive a timely response from the upstream server.

Events

This section lists all types of events that you can get through the Get classroom events method.

The classroom state changes

When the cmd property of an event is 1, the event indicates the classroom state changes, and the data property contains the following fields:

ParameterTypeDescription
startTimeNumberThe Unix timestamp (in milliseconds) when the class starts, in UTC. This property is available after the state of the classroom changes to 1".
stateInteger

The current state of the classroom:

  • 0: Not started.
  • 1: In progress.
  • 2: Ended.
  • 3: After the run-late time of a class, the room is closed and users can no longer enter the room.
endTimeNumberThe Unix timestamp (in milliseconds) when the class ends, in UTC. This property is available after the state of the classroom changes to 2.
closeTimeNumberThe Unix timestamp (in milliseconds) when the classroom closes, in UTC. This property is available after the state of the classroom changes to 3.

Example

{
  "startTime": 1611561776588,
  "state": 1
}

Receives a room chat message

When the cmd property of an event is 3, the event indicates the server receives a room chat message, and the data contains the following fields:

ParameterTypeDescription
fromUserObject

The user who sends this message. This object contains the following fields:

  • userUuid: String. The user ID.
  • userName: String. The user name.
  • role: Integer. The user role. This parameter can be set as one of the following values:
    • 1: Teacher.
    • 2: Student.
messageStringThe message.
typeIntegerThe type of the message. Temporarily, you can only set this parameter as 1(text messages).

Example

{
  "fromUser": {
    "role": "host",
    "userName": "jason",
    "userUuid": "jason1"
  },
  "message": "aa",
  "type": 1
}

Users enter or leave the classroom

When the cmd property of an event is 20, the event indicates that users have entered or left the classroom. data includes the following fields:

ParameterTypeDescription
totalIntegerThe total number of users in the classroom after this event.
onlineUsersObject Array

The new users who entered the classroom at the time of this event. This object contains the following fields:

  • userName: String. The user name.
  • userUuid: String. The user ID.
  • role: Integer. The user role. This parameter can be set as one of the following values:
    • 1: Teacher.
    • 2: Student.
  • userProperties: Object. The user property.
  • streamUuid: String. The ID of the stream, which is also the uid used when joining an RTC SDK channel.
  • type: Integer. The reasons why the user enters the room:
    • 1: The user enters the classroom in a normal way.
    • 2: The user re-enters the classroom.
  • updateTime: Number. The time when the user enters the classroom, Unix timestamp (milliseconds), UTC time.
offlineUsersObject Array

The new users who have left the classroom at the time of this event. This object contains the following fields:

  • userName: String. The user name.
  • userUuid: String. The user ID.
  • role: Integer. The user role. This parameter can be set as one of the following values:
    • 1: Teacher.
    • 2: Student.
  • userProperties: Object. The user property.
  • streamUuid: String. The ID of the stream, which is also the uid used when joining an RTC SDK channel.
  • type: Integer. The reasons why the user leaves the classroom:
    • 1: The user leaves the classroom on the client, such as leaving the class normally, the application is forcibly closed, or the user is disconnected due to poor network conditions.
    • 2: The user is kicked out of the classroom.
  • updateTime: Number. The time when the user enters or leaves the classroom, Unix timestamp (in milliseconds), UTC time.

Example

{
  "total": 3,
  "onlineUsers": [
    {
      "userName": "",
      "userUuid": "",
      "role": "0",
      "userProperties": {},
      "streamUuid": "",
      "type": 1,
      "updateTime": 1611561776588
    }
  ],
  "offlineUsers": [
    {
      "userName": "",
      "userUuid": "",
      "role": "0",
      "userProperties": {},
      "streamUuid": "",
      "type": 1,
      "updateTime": 1611561776588
    }
  ]
}

The recording state changes

When the cmd property of an event is 1001, the event indicates the recording state changes, and the data property contains the following fields:

ParameterTypeDescription
recordIdStringThis is the unique identifier of a recording session. A recording session starts when you call a method to start recording and ends when you call this method to stop recording. This field is available only when state is 1.
sidStringThe sid of the Agora Cloud Recording service. This field is available only when state is 1.
resourceIdStringThe resourceId of the Agora Cloud Recording service. This field is available only when state is 1.
stateInteger

The current recording state:

  • 2: Recording has ended.
  • 1: In recording.
startTimeNumberThe Unix timestamp (in milliseconds) when the recording starts, in UTC. This property is available after the recording state changes to "Started".
streamingUrlObjectThe URL address for the webpage after being pushed to the CDN. Students can use this URL to watch the teaching online.

Example

{
  "recordId": "xxx",
  "sid": "xxx",
  "resourceId": "xxx",
  "state": 1,
  "startTime": 1611564500488
}

The number of rewards changes

When the cmd property of an event is 1101, the event indicates the number of rewards changes, and the data property contains the following fields:

ParameterTypeDescription
rewardDetailsObject Array

Each object represents the rewards of a user and contains the following fields:

  • userUuid: String. The user ID.
  • changedReward: Integer. The number of changed rewards.
  • total: Integer. The total number of rewards after the change.
updateTimeNumberThe Unix timestamp (in milliseconds) when the rewards change, in UTC.

Example

{
  "rewardDetails": [
    {
      "userUuid": "",
      "changedReward": 1,
      "totalReward": 10
    }
  ],
  "updateTime": 1611564500488
}

The resources in the classroom change

When the cmd property of an event is 1003, the event indicates the resources in the classroom change, and the data property contains the following fields:

ParameterTypeDescription
ParameterTypeDescription
resourcesObject Array

Each object represents a public resource and contains the following fields:

  • resourceUuid: String. The resource ID.
  • resourceName: String. The resource name.
  • size: Number. The resourc size (bytes).
  • url: String. The URL address of the resource.
  • taskUuid: String. The ID of the file conversion task.
  • taskToken: String. The token used for the file conversion task.
  • taskProgress: Object. The progress of a file conversion task.
operatorObject

It contains the following fields:

  • userUuid: String. The user ID.
  • userName: String. The user name.
  • role: Integer. Th user role.
actionInteger

The resource change type:

  • 1: The resource is added or updated.
  • 2: The resource is deleted.

Example

{
  "resources": [
    {
      "resourceUuid": "",
      "resourceName": "1",
      "size": 1024,
      "url": "http://xxx.com/ooo",
      "taskUuid": "",
      "taskToken": "",
      "taskProgress": {}
    }
  ],
  "operator": {
    "role": "1",
    "userName": "jason",
    "userUuid": "jason1"
  },
  "action": 1
}

The users "on the stage" change

When the cmd property of an event is 1501, the event indicates the users "on the stage" change, and the data property contains the following fields:

ParameterTypeDescription
acceptedUsersObject Array

The list of users who are now "on the stage". The object contains the following fields:

  • userUuid: String. The user ID.
addAcceptedUsersObject Array

The list of users who have just "gone onto the stage". The object contains the following fields:

  • userUuid: String. The user ID.
removeAcceptedUsersObject Array

The list of users who have just "left the stage". The object contains the following fields:

  • userUuid: String. The user ID.

Example

{
  "acceptedUsers": [
    {
      "userUuid": ""
    }
  ],
  "addAcceptedUsers": [
    {
      "userUuid": ""
    }
  ],
  "removeAcceptedUsers": [
    {
      "userUuid": ""
    }
  ]
}

The users who wave their hands change

When the cmd property of an event is 1502, the event indicates the users who wave their hands change, and the data property contains the following fields:

ParameterTypeDescription
progressUsersObject Array

The list of users who are waving their hands. The object contains the following fields:

  • userUuid: String. The user ID.
  • payload: Object.
addProgressUsersObject Array

The list of users who have just started waving their hands. The object contains the following fields:

  • userUuid: String. The user ID.
  • payload: Object.
removeProgressUsersObject Array

The list of users who have just stopped waving their hands. The object contains the following fields:

  • userUuid: String. The user ID.
  • payload: Object.

Example

{
  "progressUsers": [
    {
      "userUuid": "",
      "payload": {}
    }
  ],
  "addProgressUsers": [
    {
      "userUuid": "",
      "payload": {}
    }
  ],
  "removeProgressUsers": [
    {
      "userUuid": "",
      "payload": {}
    }
  ]
}

Ensure service reliability

This section presents the overall strategy you use to ensure high availability of REST services.

Switch the domain name

To ensure high availability of REST services, Agora enables you to switch domain names when you experience service outage due to regional network failures. Take the following steps to set up and switch your domain name:

  1. Set the primary domain name based on the location of your service server:

    • If the DNS address of the service server is located in a country or region other than mainland China, set the primary domain name to api.agora.io.
    • If the DNS address of the service server is in mainland China, set the primary domain name to api.sd-rtn.com.
  2. If your attempt to initiate a RESTful API request using the primary domain fails, set up your retry strategy as follows:

    1. Primary domain retry: Retry using the same primary domain name.

    2. Alternate domain retry:

      • If the current primary domain name is api.sd-rtn.com, use api.agora.io as the alternate domain name.
      • If the current primary domain name is api.agora.io, use api.sd-rtn.com as the alternate domain name.
    3. Adjacent domain retry: If alternate domain retry fails, retry using the domain name adjacent to the current region.

      For example, suppose your business server is located in Europe. You set the primary domain name to api.agora.io, and the business server resolves the primary domain name to Germany. Germany is located in central Europe (api-eu-central-1.agora.io). The domain name table shows that the adjacent area is West Europe. Use the api-eu-west-1.agora.io or api-eu-west-1.sd-rtn.com domain name to retry.

Precautions

Take the following precautions when setting up your retry strategy:

  • To avoid exceeding the QPS limit with retry requests, best practice is to use a back-off strategy. For example, wait 1 second before you retry for the first time, wait 3 seconds before retrying the second time, and wait 6 seconds before retry a third time.

  • If the request fails because of a network problem rather than a DNS domain name resolution problem, skip alternate domain retry and proceed to adjacent domain retry.

  • Before switching to the region domain name, ensure that the REST services you wish to use, for example, cloud recording or channel management, are deployed in that region.

Domain name table

The following table shows the primary and region domain names for various regions.

Primary domain nameRegion domain nameRegion
api.sd-rtn.comapi-us-west-1.sd-rtn.comWestern United States
api-us-east-1.sd-rtn.comEastern United States
api-ap-southeast-1.sd-rtn.comSoutheast Asia Pacific
api-ap-northeast-1.sd-rtn.comNortheast Asia Pacific
api-eu-west-1.sd-rtn.comWestern Europe
api-eu-central-1.sd-rtn.comCentral Europe
api-cn-east-1.sd-rtn.comEast China
api-cn-north-1.sd-rtn.comNorth China
api.agora.ioapi-us-west-1.agora.ioWestern United States
api-us-east-1.agora.ioEastern United States
api-ap-southeast-1.agora.ioSoutheast Asia Pacific
api-ap-northeast-1.agora.ioNortheast Asia Pacific
api-eu-west-1.agora.ioWestern Europe
api-eu-central-1.agora.ioCentral Europe
api-cn-east-1.agora.ioEast China
api-cn-north-1.agora.ioNorth China