Updated on 2022-10-08 GMT+08:00

API Overview

The following tables list the SparkRTC APIs. Before calling a SparkRTC API, you need to obtain a user token, which can then be used to authenticate the calling of other APIs. For details about how to call a SparkRTC API, see Example 1: Creating a Single Stream Recording Job.

Application Management APIs

Table 1 Application management APIs

API

Description

POST /v2/apps

Creating an Application

GET /v2/apps

Querying Applications

GET /v2/apps/{app_id}

Querying an Application

DELETE /v2/apps/{app_id}

Deleting an Application

POST /v2/apps/{app_id}/enable

Enabling an Application

POST /v2/apps/{app_id}/disable

Disabling an Application

Recording Template Management APIs

Table 2 Recording template management APIs

API

Description

POST /v2/apps/{app_id}/record-rules

Creating or Updating a Recording Template

GET /v2/apps/{app_id}/record-rules

Querying Recording Templates

GET /v2/apps/{app_id}/record-rules/{rule_id}

Querying a Recording Template

PUT /v2/apps/{app_id}/record-rules/{rule_id}

Updating a Recording Template

DELETE /v2/apps/{app_id}/record-rules/{rule_id}

Deleting a Recording Template

Automatic Recording Configuration APIs

Table 3 Automatic recording configuration APIs

API

Description

PUT /v2/apps/{app_id}/auto-record-mode

Updating the Automatic Recording Configuration

GET /v2/apps/{app_id}/auto-record-mode

Querying the Automatic Recording Configuration

Application Callback Management APIs

Table 4 Application callback management APIs

API

Description

PUT /v2/apps/{app_id}/record-callback

Configuring a Recording Event Callback

GET /v2/apps/{app_id}/record-callback

Querying a Recording Event Callback

Mixed Stream Recording Job Management APIs

Table 5 Mixed stream recording job management APIs

API

Description

POST /v2/apps/{app_id}/mix-stream-jobs

Starting a Mixed Stream Recording Job

GET /v2/apps/{app_id}/mix-stream-jobs/{job_id}

Querying a Mixed Stream Recording Job

PUT /v2/apps/{app_id}/mix-stream-jobs/{job_id}

Modifying a Mixed Stream Recording Job

DELETE /v2/apps/{app_id}/mix-stream-jobs/{job_id}

Stopping a Mixed Stream Recording Job

Single Stream Recording Job Management APIs

Table 6 Single stream recording job management APIs

API

Description

POST /v2/apps/{app_id}/individual-stream-jobs

Starting a Single Stream Recording Job

GET /v2/apps/{app_id}/individual-stream-jobs/{job_id}

Querying a Single Stream Recording Job

DELETE /v2/apps/{app_id}/individual-stream-jobs/{job_id}

Stopping a Single Stream Recording Job

PUT /v2/apps/{app_id}/individual-stream-jobs/{job_id}

Updating a Single Stream Recording Job

Room Management

Table 7 Room management APIs

API

Description

POST /v2/apps/{app_id}/rooms/{room_id}/batch-remove-users

Removing an online user

POST /v2/apps/{app_id}/rooms/{room_id}/dismiss

Dismissing a Room

Statistical Analysis APIs

Table 8 Statistical analysis APIs

API

Description

GET /v1/{project_id}/rtc/rooms

Querying Rooms

GET /v1/{project_id}/rtc/users

Querying Users

GET /v1/{project_id}/rtc/realtime/scale

Querying Real-time Scale Data

GET /v1/{project_id}/rtc/realtime/scale/dimension

Querying Real-time Scale Data Distribution

GET /v1/{project_id}/rtc/realtime/quality

Querying Real-time Quality Data

GET /v1/{project_id}/rtc/realtime/network

Querying Real-time Network Data

GET /v1/{project_id}/rtc/history/usage

Querying Usage

GET /v1/{project_id}/rtc/history/scale

Querying Historical Scale Data

GET /v1/{project_id}/rtc/history/quality

Querying Historical Quality Data

GET /v1/{project_id}/rtc/client/qos/details

Querying User Call Indicators

GET /v1/rtc/data/abnormal-event

Querying Exceptions

GET /v1/rtc/data/abnormal-event/dimension

Querying Exception Distribution