Help Center> CodeArts Deploy> API Reference> APIs> Managing Applications> Disabling and Enabling an Application
Updated on 2024-07-05 GMT+08:00

Disabling and Enabling an Application

Function

This API is used to disable or enable an application.

Calling Method

For details, see Calling APIs.

URI

PUT /v1/applications/{app_id}/disable

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

app_id

Yes

String

Application ID

Minimum: 32

Maximum: 32

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Minimum: 0

Maximum: 20000

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

is_disable

Yes

Boolean

true: Disable. false: Enable.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

status

String

Request success or failure status

Example Requests

https://{endpoint}/v1/applications/dbc0305b030f41ce866739c3331166ff/disable

{
  "is_disable" : true
}

Example Responses

Status code: 200

OK: The request is successful.

{
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK: The request is successful.

Error Codes

See Error Codes.