Skip to content

Zone Object Delete

To delete a zone object (Channel, Web Service Connection, Database Connection, DICOM Connection, System Variable, HTML Form, Published Mapping, Published Function, SSL Private Key, SSL Certificate, Package) call the URI http(s)://<qie_server>:<management_api_port>/zone/zoneObject/delete with the following payload:

{
   "zoneName": "<desired zone>",
   "zoneObjectType": "<desired object type>",
   "zoneObjectName": "<desired object name>",
   "formatOutput": true | false
}

Base JSON Payload Definition

Node Description
zoneName REQUIRED: The name of the zone containing the object to delete.
zoneObjectType REQUIRED: One of the following values for zone object type: ("Channel" | "Web Service Connection" | "Database Connection" | "DICOM Connection" | "System Variable" | "HTML Form" | "Published Mapping" | "Published Function" | "SSL Private Key" | "SSL Certificate" | "Package"). Values are case insensitive and may be used with or without spaces.
zoneObjectName REQUIRED: The name of the zone object to delete.
formatOutput True if the response JSON should be formatted as human readable (default=false).

The following response is received if the zone and zone object are found, and it was successfully deleted:

HTTP Status: 200

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

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

HTTP Status: 400

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

The request is refused with HTTP 400 when the object is still in use, for example Cannot delete object for zoneName (Zone A), zoneObjectType (System Variable), and zoneObjectName (facility): This is currently used in 2 places. The Management API has no override for a confirmed usage.

Scripts that contain syntax errors cannot be fully checked, so the Management API refuses the delete rather than removing an object that one of them might use. The error names the count, for example Cannot delete object for zoneName (Zone A), zoneObjectType (System Variable), and zoneObjectName (facility): Usage can not be verified. 1 script containing errors. Fix the script and call again. When a confirmed usage and an unparseable script are both present the error carries both sentences, for example This is currently used in 2 places. 1 script containing errors.

A search that does not complete is refused the same way, with The search for usages did not complete. The results may not include all usages. after the first sentence.

Channels and packages are refused the same way when they are in use. A package is refused when any of its members is used outside the package, for example Cannot delete object for zoneName (Zone A), zoneObjectType (Package), and zoneObjectName (myPackage): Unable to delete Package. This is currently being used in 2 place(s) outside of this package.

Example curl command:

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