Deleting resources deployed to an integration server by using the administration REST API

You can use the IBM® App Connect Enterprise administration REST API to delete resources that are deployed to an integration server. The resources to be deleted must already be deployed on the integration server.

Before you begin

Read the following topics:

About this task

Deleting a specific deployed resource on an integration server

Procedure

Delete a resource

  • For an independent integration server:
    POST http://hostname:port/apiv2/delete

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

    curl -X POST http://hostname:port/apiv2/delete?names=HTTPTestApplication
    If the command is successful, an HTTP status code 200 and a response similar to the following are returned:
    {
        "type": "responseLog",
        "count": 2,
        "uri": "/apiv2/delete",
        "LogEntry": [
            {
                "type": "logEntry",
                "message": {
                    "number": 1062,
                    "severity": 0,
                    "severityCode": "I",
                    "source": "BIPmsgs",
                    "inserts": 2,
                    "timestamp": 1604862778,
                    "threadId": 21116,
                    "threadSequenceNumber": 1
                },
                "text": "BIP1062I: Removing the following objects from integration server 'KCTEST':  HTTPTestApplication ",
                "detailedText": ""
            },
            {
                "type": "logEntry",
                "message": {
                    "number": 9521,
                    "severity": 0,
                    "severityCode": "I",
                    "source": "BIPmsgs",
                    "inserts": 2,
                    "timestamp": 1604862783,
                    "threadId": 21116,
                    "threadSequenceNumber": 2
                },
                "text": "BIP9521I: Application 'HTTPTestApplication' has been deleted. ",
                "detailedText": "The resource 'HTTPTestApplication' of type 'Application' has been deleted. "
            }
        ]
    }
    

    To delete more than one resource, specify a colon-delimited set of deployed resource names. For example, to delete the deployed applications HTTPTestApplication and MonitoringApp, use following curl command.

    curl -X POST http://hostname:port/apiv2/delete?names=HTTPTestApplication:MonitoringApp
  • For a managed integration server:
    POST http://hostname:port/apiv2/servers/integrationServerName/delete

    For example, to delete the application that is called HTTPTestApplication deployed on integration server ACESERV1, use the following curl command:

    curl -X POST http://hostname:port/apiv2/servers/ACESERV1/delete?names=HTTPTestApplication

    To delete more than one resource, specify a colon-delimited set of deployed resource names. For example, to delete the applications HTTPTestApplication and MonitoringApp that are deployed on integration server ACESERV1, use following curl command:

    curl -X POST http://hostname:port/apiv2/servers/ACESERV1/delete?names=HTTPTestApplication:MonitoringApp

Deleting all deployed resources on an integration server

Procedure

Delete all deployed resources.

  • For an independent integration server:
    POST http://hostname:port/apiv2/delete-all

    For example, use the following curl command:

    curl -X POST http://hostname:port/apiv2/delete-all
    If the command is successful, an HTTP status code 200 and a response similar to the following are returned:
    {
        "type": "responseLog",
        "count": 3,
        "uri": "/apiv2/delete-all",
        "LogEntry": [
            {
                "type": "logEntry",
                "message": {
                    "number": 9521,
                    "severity": 0,
                    "severityCode": "I",
                    "source": "BIPmsgs",
                    "inserts": 2,
                    "timestamp": 1604862622,
                    "threadId": 19616,
                    "threadSequenceNumber": 1
                },
                "text": "BIP9521I: Application 'MonitoringPayloadApp' has been deleted. ",
                "detailedText": "The resource 'MonitoringPayloadApp' of type 'Application' has been deleted. "
            },
            {
                "type": "logEntry",
                "message": {
                    "number": 9521,
                    "severity": 0,
                    "severityCode": "I",
                    "source": "BIPmsgs",
                    "inserts": 2,
                    "timestamp": 1604862622,
                    "threadId": 19616,
                    "threadSequenceNumber": 2
                },
                "text": "BIP9521I: Application 'MyHttpTestApp' has been deleted. ",
                "detailedText": "The resource 'MyHttpTestApp' of type 'Application' has been deleted. "
            },
            {
                "type": "logEntry",
                "message": {
                    "number": 9521,
                    "severity": 0,
                    "severityCode": "I",
                    "source": "BIPmsgs",
                    "inserts": 2,
                    "timestamp": 1604862622,
                    "threadId": 19616,
                    "threadSequenceNumber": 3
                },
                "text": "BIP9521I: PolicyProject 'MonitoringPolicyProject' has been deleted. ",
                "detailedText": "The resource 'MonitoringPolicyProject' of type 'PolicyProject' has been deleted. "
            }
        ]
    }
    
  • For a managed integration server:
    POST http://hostname:port/apiv2/servers/integrationServerName/delete-all

    For example, to delete all resources deployed on integration server ACESERV1, use the following curl command:

    curl -X POST http://hostname:port/apiv2/servers/ACESERV1/delete-all