Deleting applications, REST APIs, and integration services by using the administration REST API

You can use the IBM® App Connect Enterprise administration REST API to delete named applications, REST APIs, and integration services that are deployed on an integration server. The application, REST API, or integration service to be deleted must already be deployed on the integration server.

Before you begin

Read the following topics:

About this task

The action of deleting an application, REST API, or integration service includes issuing a tear down request followed by the deletion. The teardown operation is part of the deletion operation: you do not have to issue a teardown request. The application, REST API, or integration service is deleted from the integration server and from the configuration on disk; the application, REST API, or integration service is undeployed.

Deleting an application on an integration server

Procedure

Delete an application.

  • For an independent integration server:
    DELETE http://hostname:port/apiv2/applications/applicationName

    For example, to delete the application that is called HTTPInputApplication, use the following curl command:

    curl -X DELETE http://hostname:port/apiv2/applications/HTTPInputApplication
    If the command is successful, an HTTP status code 200 and a response similar to the following are returned:
    {
      "type": "responseLog",
      "count": 1,
      "uri": "",
      "LogEntry": [
        {
          "type": "logEntry",
          "message": {
            "number": 9521,
            "severity": 0,
            "severityCode": "I",
            "source": "BIPmsgs",
            "inserts": 2,
            "timestamp": 1592387071,
            "threadId": 4460,
            "threadSequenceNumber": 1
          },
          "text": "BIP9521I: Application 'HTTPInputApplication' has been deleted. ",
          "detailedText": "The resource 'HTTPInputApplication' of type 'Application' has been deleted. "
        }
      ]
    }
    
    Additionally, to verify that the application has been deleted, use the GET API call as described in Displaying applications, REST APIs, and integration services by using the administration REST API. Specify a value of 2 on the depth query parameter in the API call to obtain the information that shows whether the application has been deleted. For example, use the following curl command:
    curl -X GET http://hostname:port/apiv2/applications?depth=2
    For an example of the response that is returned for such an API call, see Check that an application has been deleted from an independent integration server.
  • For an integration server that is managed by an integration node:
    DELETE http://hostname:port/apiv2/servers/integrationServerName/applications/applicationName

    For example, to delete the application that is called HTTPInputApplication deployed on integration server ACESERV1, which is managed by an integration node, use the following curl command:

    curl -X DELETE http://hostname:port/apiv2/servers/ACESERV1/applications/HTTPInputApplication
    If the command is successful, an HTTP status code 200 and a response similar to the following are returned:
    {
      "type": "responseLog",
      "count": 1,
      "uri": "",
      "LogEntry": [
        {
          "type": "logEntry",
          "message": {
            "number": 9521,
            "severity": 0,
            "severityCode": "I",
            "source": "BIPmsgs",
            "inserts": 2,
            "timestamp": 1591203977,
            "threadId": 4460,
            "threadSequenceNumber": 1
          },
          "text": "BIP9521I: Application 'HTTPInputApplication' has been deleted. ",
          "detailedText": "The resource 'HTTPInputApplication' of type 'Application' has been deleted. "
        }
      ]
    }
    
    Additionally, to verify that the application has been deleted, use the GET API call as described in Displaying applications, REST APIs, and integration services by using the administration REST API. Specify a value of 2 on the depth query parameter in the API call to obtain the information that shows whether the application has been deleted. For example, to display the information about applications on integration server ACESERV1, use the following curl command:
    curl -X GET http://hostname:port/apiv2/servers/ACESERV1/applications?depth=2
    For an example of the response that is returned for such an API call, see Check that an application has been deleted from an integration server that is managed by an integration node.

Deleting a REST API on an integration server

Procedure

Delete a REST API.

  • For an independent integration server:
    DELETE http://hostname:port/apiv2/rest-apis/rest-apiName

    If the command is successful, an HTTP status code 200 is returned.

    To verify that the REST API has been deleted, use the GET API call as described in Displaying applications, REST APIs, and integration services by using the administration REST API. Specify a value of 2 on the depth query parameter in the API call to obtain the information that shows whether the REST API has been deleted.

  • For an integration server that is managed by an integration node:
    DELETE http://hostname:port/apiv2/servers/integrationServerName/rest-apis/rest-apiName

    If the command is successful, an HTTP status code 200 is returned.

    To verify that the REST API has been deleted, use the GET API call as described in Displaying applications, REST APIs, and integration services by using the administration REST API. Specify a value of 2 on the depth query parameter in the API call to obtain the information that shows whether the REST API has been deleted.

Deleting an integration service on an integration server

Procedure

Delete an integration service.

  • For an independent integration server:
    DELETE http://hostname:port/apiv2/services/integrationServiceName

    If the command is successful, an HTTP status code 200 is returned.

    To verify that the integration service has been deleted, use the GET API call as described in Displaying applications, REST APIs, and integration services by using the administration REST API. Specify a value of 2 on the depth query parameter in the API call to obtain the information that shows whether the integration service has been deleted.

  • For an integration server that is managed by an integration node:
    DELETE http://hostname:port/apiv2/servers/integrationServerName/services/integrationServiceName

    If the command is successful, an HTTP status code 200 is returned.

    To verify that the integration service has been deleted, use the GET API call as described in Displaying applications, REST APIs, and integration services by using the administration REST API. Specify a value of 2 on the depth query parameter in the API call to obtain the information that shows whether the integration service has been deleted.