Deleting a queue by using a REST Administration API

System administrators can delete queues by using a REST Administration API.

You can delete a queue by using a REST Administration API, or by using the Amlen WebUI. For more information about using the Amlen WebUI to delete a queue, see Configuring queues by using the Amlen WebUI.

Note: You cannot delete a queue unless the queue is empty, or you discard the messages on the queue by specifying DiscardMessages=true.
To delete a queue, use the Eclipse Amlen REST API DELETE method with the following Eclipse Amlen configuration URI:

http://<admin-endpoint-IP:Port>/ima/v1/configuration/Queue/<NameOfQueue>?DiscardMessages=true|false

Where:

NameOfQueue
Specifies the name of the queue you want to delete.
You cannot delete a queue unless the queue is empty, or you discard any messages on the queue by specifying DiscardMessages=true
DiscardMessages=true|false
Optional.
Specifies whether any messages on the queue are discarded.
The default value is false.

The following example demonstrates deleting a queue named testQ by using cURL.

curl -X DELETE
    http://127.0.0.1:9089/ima/v1/configuration/Queue/testQ?DiscardMessages=true

The following example shows an example response to the DELETE method:


{        
  "Version": "v1",
  "Code": "CWLNA6011",
  "Message": "The requested configuration change has completed successfully."
}