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

Disabling an Application

Function

Disables an application.

After the application is disabled, new rooms cannot be added or joined, and rooms that have been joined can still be used. The stream mixing and recording functions are also unavailable.

URI

POST /v2/apps/{app_id}/disable

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

app_id

Yes

String

Application ID.

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

app_id

String

Application ID.

state

AppState object

Application status

Table 5 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.

Status code: 404

Table 6 Response header parameters

Parameter

Type

Description

X-request-Id

String

Request ID for task tracing.

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Description.

Status code: 500

Table 8 Response header parameters

Parameter

Type

Description

X-request-Id

String

Request ID for task tracing.

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Description.

Example Requests

POST https://rtc-api.myhuaweicloud.com/v2/apps/{app_id}/disable

Example Responses

Status code: 200

The application is disabled.

{
  "app_id" : "123456789abcdefghijklmno",
  "state" : {
    "state" : "DEACTIVATION",
    "update_time" : "2020-07-26T07:03:05.075Z"
  }
}

Status code: 404

The application ID does not exist.

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

Status code: 500

Configuration failed due to server error.

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

Status Codes

Status Code

Description

200

The application is disabled.

404

The application ID does not exist.

500

Configuration failed due to server error.

Error Codes

See Error Codes.