Skip to content

Zone Delete

To delete a zone, call the URI http(s)://<qie_server>:<management_api_port>/zone/delete with the following payload:

{
   "zoneName": "<desired zone>",
   "formatOutput": true | false
}

Base JSON Payload Definition

Node Description
zoneName REQUIRED: The name of the zone to delete. The global zone (Global Settings) cannot be deleted.
formatOutput True if the response JSON should be formatted as human readable (default=false).

The following response is received if the zone was found and successfully deleted:

HTTP Status: 200

{
   "message": "<response_message>"
}
Node Description
message This message indicates whether the zone was deleted.

If there is an error finding the zone or deleting the zone, then the following response is received:

HTTP Status: 400

{
   "error": "<error message>"
}

Example curl command:

curl -H "apiToken:abc123" --request POST http://qieserver:9999/zone/delete -d '{"zoneName":"myZoneName"}'
curl -H "apiToken:abc123" --request POST http://qieserver:9999/zone/delete -d "{\"zoneName\":\"myZoneName\"}"
curl -H @{"apiToken"="abc123"} -Method POST http://qieserver:9999/zone/delete -Body '{"zoneName":"myZoneName"}' | Select-Object -Expand RawContent

Use with caution

Deleted zone objects can only be restored from a backup configuration or database backup.

Channels must be stopped and all messages purged before a channel can be deleted.