Batch Deleting Zones
Function
This API is used to delete zones in batches.
This is an atomic operation. All zones are either deleted completely or not deleted at all.
Both public and private zones are supported.
Calling Method
For details, see Calling APIs.
URI
DELETE /v2.1/zones
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
zone_type |
Yes |
String |
Definition Type of the zone to be deleted Constraints N/A Range
Default Value N/A |
zone_ids |
Yes |
Array of strings |
Definition ID list of zones to be deleted. Constraints You can specify a maximum of 50 IDs. Range N/A Default Value N/A |
Response Parameters
Status code: 202
Parameter |
Type |
Description |
---|---|---|
zones |
Array of ZoneData objects |
Definition Zone list Range N/A |
metadata |
metadata object |
Definition Number of resources that meet the filter condition Range N/A |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Definition Zone ID, which is a UUID used to identify the zone Range N/A |
name |
String |
Definition Zone Range N/A |
description |
String |
Definition The description of the zone. Range The value can contain a maximum of 255 characters. |
|
String |
Definition Email address of the administrator who manages the zone. The email address is used to generate the SOA record set of the zone. Range N/A |
ttl |
Integer |
Definition The TTL specified in the SOA record in the zone. It is measured in seconds. Range 1 to 2147483647 |
serial |
Integer |
Definition Sequence number used to identify zone file changes in the SOA record set of the zone. The sequence number is used for synchronization between the primary and secondary nodes. This parameter is reserved. Range N/A |
masters |
Array of strings |
Definition Primary DNS servers, from which the secondary DNS servers get DNS information Currently, this parameter is not used. Range N/A |
status |
String |
Definition The zone status. Range
|
pool_id |
String |
Definition Pool ID of the zone, which is assigned by the system Range N/A |
project_id |
String |
Definition Project ID of the zone Range N/A |
zone_type |
String |
Definition Zone type Range
|
created_at |
String |
Definition The creation time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS Range N/A |
updated_at |
String |
Definition The update time. Format: yyyy-MM-dd'T'HH:mm:ss.SSS Range N/A |
record_num |
Integer |
Definition Number of record sets for the zone Range N/A |
links |
Link object |
Definition Link to the current resource. Range N/A |
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Definition Number of resources that meet the filter criteria. The number is irrelevant to limit or offset. Range N/A |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition Error code Range N/A |
message |
String |
Definition Error description Range N/A |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
code |
String |
Definition Error code Range N/A |
message |
String |
Definition Error description Range N/A |
Example Requests
Deleting zones in batches
DELETE https://{endpoint}/v2.1/zones { "zone_type" : "public", "zone_ids" : [ "2c9eb155587194ec01587224c9f90149", "2c9eb155587194ec01587224c9f90150" ] }
Example Responses
Status code: 202
Request accepted
{ "links" : { "self" : "https://Endpoint/v2.1/zones" }, "zones" : [ { "id" : "2c9eb155587194ec01587224c9f90149", "name" : "example.com.", "description" : "This is an example zone.", "email" : "xx@example.com", "ttl" : 300, "serial" : 0, "masters" : [ ], "status" : "ACTIVE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587194ec01587224c9f90149" }, "pool_id" : "00000000570e54ee01570e9939b20019", "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "zone_type" : "public", "created_at" : "2016-11-17T11:56:03.439", "updated_at" : "2016-11-17T11:56:05.528", "record_num" : 2 }, { "id" : "2c9eb155587228570158722996c50001", "name" : "example.org.", "description" : "This is an example zone.", "email" : "xx@example.org", "ttl" : 300, "serial" : 0, "masters" : [ ], "status" : "PENDING_CREATE", "links" : { "self" : "https://Endpoint/v2/zones/2c9eb155587228570158722996c50001" }, "pool_id" : "00000000570e54ee01570e9939b20019", "project_id" : "e55c6f3dc4e34c9f86353b664ae0e70c", "zone_type" : "public", "created_at" : "2016-11-17T12:01:17.996", "updated_at" : "2016-11-17T12:01:18.528", "record_num" : 2 } ], "metadata" : { "total_count" : 2 } }
Status Codes
Status Code |
Description |
---|---|
202 |
Request accepted |
400 |
Error response |
500 |
Error response |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.