Delete multiple hosts at a time

2024-11-06 03:13:28  Updated

Description

You can call this operation to delete multiple hosts at a time.

Call description

Prerequisite

You have the HOST_MANAGER permissions.

Request path

POST /api/v2/compute/hosts/batchDelete

Request parameters

Parameter Type Required Example value Description
hostIdList LongArray Yes [1001,1002] The list of host IDs.

Response parameters

Parameter Type Description
successful Boolean Indicates whether the request was successful.
timestamp Datetime The timestamp when the server completed the request.
duration Integer The time taken by the server to process the request, in milliseconds.
status Integer An HTTP status code.
traceId String The trace ID of the request. This trace ID is used for troubleshooting.
server String The address of the application server that responded to the request.

Examples

Sample request

POST /api/v2/compute/hosts/batchDelete

curl --user <username>:<password> -X POST 'http://<ip>:<port>/api/v2/compute/hosts/batchDelete' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"hostIdList":[4000002]}'

Sample response

{
  "duration": 111,
  "server": "a83ad33525",
  "status": 200,
  "successful": true,
  "timestamp": "2021-08-25T20:15:22.652+08:00",
  "traceId": "251e47a32d644396"
}

Contact Us