Deleting a configuration object by using REST Administration APIs

System administrators can delete configuration objects, including endpoints, connection policies, messaging policies, and message hubs by using a REST Administration API.

You can delete a configuration object by using a REST Administration API, or by using the Amlen WebUI. For more information about using the Amlen WebUI to delete a configuration object, see the appropriate information that relates to using the Amlen WebUI.

You can use the Eclipse Amlen REST API DELETE method to delete configuration objects, including endpoints, connection policies, messaging policies, and message hubs. To delete a message hub, you must first delete the endpoints that are associated with the message hub. You can delete the connection policies and messaging policies, or keep them to use with another endpoint.

The following list shows the valid object types that you can delete by using the Eclipse Amlen REST API DELETE method:
  • CertificateProfile
  • ClientCertificate
  • ClientSet
  • ConfigurationPolicy
  • ConnectionPolicy
  • DestinationMappingRule
  • EndPoint
  • LTPAProfile
  • MessageHub
  • MQTTClient
  • OAuthProfile
  • Plugin
  • Queue. For more information about deleting a message queue, see Deleting a queue by using a REST Administration API.
  • QueueManagerConnection
  • QueuePolicy
  • SecurityProfile
  • SubscriptionPolicy
  • TopicPolicy
  • TrustedCertificate
To delete a configuration object, use the Eclipse Amlen REST API DELETE method with the following Eclipse Amlen configuration URI:

http://<admin-endpoint-IP:Port>/ima/v1/configuration/<ObjectType>/<ObjectName>

where:
  • ObjectType

    Required.

    Specifies the type of configuration object.

    A valid list of object types is displayed in the "About this task" section.

  • ObjectName

    Required.

    Specifies the name of a specific configuration object.

The following example shows the deletion of a specific instance of a MessageHub called "MyHub" by using cURL:

curl -X DELETE http://127.0.0.1:9089/ima/v1/configuration/MessageHub/MyHub
Note: All endpoints that are associated with a message hub must be deleted before you can delete the message hub. In this delete example, the following message is returned because an endpoint still exists on the message hub:

{
      "Version":"v1",
      "Code":"CWLNA0438",
      "Message":"MessageHub is in use. It still contains at least one endpoint."
 }