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

Listing Applications

Function

This API is used to list applications.

URI

GET /v2/apps

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

state

No

String

Application status. The options are as follows:

  • ACTIVATION: The application is enabled.

  • DEACTIVATION: The application is disabled.

  • ARREARS: The application is in arrears.

offset

No

Integer

Start number of the query result, indicating the page number. The default value is 0.

limit

No

Integer

Number of records on each page. The value ranges from 1 to 100. The default value is 100.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Content type.

X-Auth-Token

No

String

User token. This parameter is mandatory when token authentication is used. It can be obtained by calling the IAM API that is used for obtaining a user token. The value of X-Subject-Token in the response header is the user token.

Authorization

No

String

Authentication information. This parameter is mandatory when AK/SK-based authentication is used.

X-Sdk-Date

No

String

Time when the request is sent. This parameter is mandatory when AK/SK-based authentication is used.

X-Project-Id

No

String

Project ID. This parameter is mandatory when AK/SK-based authentication is used.

Response Parameters

Status code: 200

Table 3 Response header parameters

Parameter

Type

Description

X-request-Id

String

Request ID for task tracing.

Table 4 Response body parameters

Parameter

Type

Description

count

Integer

Total number of applications.

apps

Array of App objects

Application list.

Table 5 App

Parameter

Type

Description

app_name

String

Application name.

app_id

String

Application ID.

state

AppState object

Application status.

scope

String

RTC coverage range.

The options are as follows:

  • DOMESTIC: inside the Chinese mainland

  • OVERSEA: outside the Chinese mainland

  • GLOBAL: global

tenant_name

String

Account name.

domain

String

Domain name corresponding to the application.

create_time

String

Creation time, for example, 2006-01-02T15:04:05.075Z. The time zone is UTC.

authentication

AppAuth object

Authentication configuration.

callbacks

AppCallbacks object

Callback configuration.

auto_record_mode

AppAutoRecordMode object

Automatic recording configuration.

Table 6 AppState

Parameter

Type

Description

state

String

Status

  • ACTIVATION: enabled

  • DEACTIVATION: disabled

  • ARREARS: outstanding amount

  • DELETED: The task has been deleted.

update_time

String

Update time of the application authentication, for example, 2006-01-02T15:04:05.075Z. The time zone is UTC.

Table 7 AppAuth

Parameter

Type

Description

enable

Boolean

Whether to enable or disable URL authentication.

expire

Integer

Validity period of the signature for authenticating the connection to RTC. Unit: second. The default value is 300. The signature is generated based on app_key.

app_key

String

Application authentication key.

update_time

String

Update time of the application authentication, for example, 2006-01-02T15:04:05.075Z. The time zone is UTC.

Table 8 AppCallbacks

Parameter

Type

Description

push_callback

AppCallbackUrl object

Forwarding callback.

record_callback

AppCallbackUrl object

Recording callback.

Table 9 AppCallbackUrl

Parameter

Type

Description

url

String

Callback notification URL, which must start with http:// or https:// and support POST.

auth_key

String

Callback key, which is used for authentication. If this parameter is not set or left empty, the authentication header field will not be added to the callback.

notify_event_subscription

Array of strings

Cloud recording notification subscription message.

The options are as follows:

  • RECORD_NEW_FILE_START: Recording started.

  • RECORD_FILE_COMPLETE: Recording file generated.

update_time

String

Update time, for example, 2006-01-02T15:04:05.075Z. The time zone is UTC.

Table 10 AppAutoRecordMode

Parameter

Type

Description

mode

String

Recording mode.

  • AUTO_RECORD_OFF: Automatic recording is disabled.

  • AUTO_INDIVIDUAL_RECORD: Automatic recording is enabled for single streams. In this case, record_rule_id must not be left empty.

record_rule_id

String

Recording rule ID.

update_time

String

Update time, for example, 2006-01-02T15:04:05.075Z. The time zone is UTC.

Status code: 400

Table 11 Response header parameters

Parameter

Type

Description

X-request-Id

String

Request ID for task tracing.

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Description.

Status code: 500

Table 13 Response header parameters

Parameter

Type

Description

X-request-Id

String

Request ID for task tracing.

Table 14 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Description.

Example Requests

GET https://rtc-api.myhuaweicloud.com/v2/apps

Example Responses

Status code: 200

Listing Applications

{
  "count" : 1,
  "apps" : [ {
    "app_name" : "example",
    "app_id" : "123456789abcdefghijklmno",
    "state" : {
      "state" : "ACTIVATION",
      "update_time" : "2020-07-26T07:03:05.075Z"
    },
    "scope" : "DOMESTIC",
    "tenant_name" : "hwstaff_pub_videortc",
    "domain" : "123456789abcdefghijklmno.rtc.huawei.com",
    "create_time" : "2020-07-26T07:03:05.075Z",
    "authentication" : {
      "enable" : true,
      "expire" : 300,
      "app_key" : "12345ABCDEF12345",
      "update_time" : "2020-07-26T07:03:05.075Z"
    },
    "callbacks" : {
      "push_callback" : {
        "url" : "",
        "auth_key" : "",
        "update_time" : ""
      },
      "record_callback" : {
        "url" : "http://mydomain.com",
        "auth_key" : "78912374ae8cdb38",
        "update_time" : "2020-07-26T07:53:05.075Z"
      }
    },
    "auto_record_mode" : {
      "mode" : "AUTO_RECORD_OFF",
      "update_time" : "2020-07-26T07:53:05.075Z"
    }
  } ]
}

Status code: 400

The request cannot be understood by the server or parameters are incorrect.

{
  "error_code" : "RTC.00001003",
  "error_msg" : "InvalidParameterValue"
}

Status code: 500

Query failed due to server error.

{
  "error_code" : "RTC.00002xxx",
  "error_msg" : "InternalError"
}

Status Codes

Status Code

Description

200

Listing Applications

400

The request cannot be understood by the server or parameters are incorrect.

500

Query failed due to server error.

Error Codes

See Error Codes.