Help Center> CodeArts Deploy> API Reference> APIs> Environment Management> Deleting a Host from an Environment
Updated on 2023-09-21 GMT+08:00

Deleting a Host from an Environment

Function

This API is used to delete a host of an environment.

URI

DELETE /v1/applications/{application_id}/environments/{environment_id}/{host_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

application_id

Yes

String

Application ID.

Minimum: 32

Maximum: 32

environment_id

Yes

String

Environment ID.

Minimum: 32

Maximum: 32

host_id

Yes

String

Host ID.

Minimum: 32

Maximum: 32

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Possible values: application/json;charset=utf-8 application/json

Default: application/json;charset=utf-8

Enumeration values:

  • application/json;charset=utf-8

  • application/json

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

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

status

String

Response status.

result

String

Environment ID.

Example Requests

https://{endpoint}/v1/applications/7de12f87232e46a79235f52d033b8688/environments/25e30c17f81042ba9a1a3383da39a7fc/c5fa45c92c0849229d003d98f52617eb

Example Responses

Status code: 200

OK: The request is successful.

{
  "status" : "success",
  "result" : "c5fa45c92c0849229d003d98f52617eb"
}

Status Codes

Status Code

Description

200

OK: The request is successful.

Error Codes

See Error Codes.