Deploying resources to an integration server by using the administration REST API

You can use the IBM® App Connect Enterprise administration REST API to deploy resources such as BAR files to an integration server.

Before you begin

Read the following topics:

About this task

This topic describes how to deploy resources to an integration server by using the administration REST API. You can use one of two operations in your administration REST API command to deploy resources:
  • delete-all with one of the following values:
    • true to ensure deletion of all resources already deployed to the integration server before deploying your resource.
    • false to perform deployment of the resource without deleting any resources that are already deployed to the integration server.
  • deploy-action with a value of ImpactAnalysis to perform an impact analysis of the deployment without actually deploying the resource.
You can specify delete-all or deploy-action. You cannot specify both in the same administration REST API command.

Procedure

Deploy a resource.

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

    For example, to deploy a BAR file called httpreqreply.bar and delete all resources already deployed to the integration server, use the following curl command:

    curl -X POST "http://hostname:port/apiv2/deploy?delete-all=true" -H 'accept:application/json' -H 'content-type:application/octet-stream' -H 'content-disposition: attachment; filename=httpreqreply.bar' --data-binary @/tmp/httpreqreply.bar

    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/deploy",
       "LogEntry":[
          {
             "type":"logEntry",
             "message":{
                "number":9521,
                "severity":0,
                "severityCode":"I",
                "source":"BIPmsgs",
                "inserts":2,
                "timestamp":1674494446,
                "threadId":26863,
                "threadSequenceNumber":1
             },
             "text":"BIP9521I: Application 'HttpReqReply' has been deleted. ",
             "detailedText":"The resource 'HttpReqReply' of type 'Application' has been deleted. "
          },
          {
             "type":"logEntry",
             "message":{
                "number":9332,
                "severity":0,
                "severityCode":"I",
                "source":"BIPmsgs",
                "inserts":3,
                "timestamp":1674494446,
                "threadId":26863,
                "threadSequenceNumber":2
             },
             "text":"BIP9332I: Application 'HttpReqReply' has been created successfully. ",
             "detailedText":"The resource 'HttpReqReply' of type 'Application' has been successfully created. "
          },
          {
             "type":"logEntry",
             "message":{
                "number":9326,
                "severity":0,
                "severityCode":"I",
                "source":"BIPmsgs",
                "inserts":1,
                "timestamp":1674494446,
                "threadId":26863,
                "threadSequenceNumber":3
             },
             "text":"BIP9326I: The source 'httpreqreply.bar' has been successfully deployed. ",
             "detailedText":""
          }
       ]
    }

    To employ the query parameter ImpactAnalysis before deploying a BAR file called httpreqreply.bar, use the following curl command:

    curl -X POST   "http://hostname:port/apiv2/deploy?deploy-action=ImpactAnalysis" -H 'accept:application/json' -H 'content-type:application/octet-stream' --data-binary @/tmp/httpreqreply.bar

    If the command is successful, an HTTP status code 200 and a response similar to the following are returned:

    {
      "type": "responseLog",
      "count": 2,
      "uri": "",
      "LogEntry": [
        {
          "type": "logEntry",
          "message": {
            "number": 2795,
            "severity": 0,
            "severityCode": "I",
            "source": "BIPmsgs",
            "inserts": 2,
            "timestamp": 1592148512,
            "threadId": 31842,
            "threadSequenceNumber": 1
          },
          "text": "BIP2795I: Modified Application 'HttpReqReply' has passed validation. ",
          "detailedText": ""
        },
        {
          "type": "logEntry",
          "message": {
            "number": 2781,
            "severity": 0,
            "severityCode": "I",
            "source": "BIPmsgs",
            "inserts": 1,
            "timestamp": 1592148512,
            "threadId": 31842,
            "threadSequenceNumber": 2
          },
          "text": "BIP2781I: BAR file 'rest-deploy.bar' has successfully completed analysis. ",
          "detailedText": ""
        }
      ]
    }
  • For a managed integration server:
    POST http://hostname:port/apiv2/servers/integrationServerName/deploy

    For example, to deploy a BAR file called httpreqreply.bar to integration server ACESERV1 without deleting any resources that are deployed to the integration server, use the following curl command:

    curl --request POST --url "http://hostname:port/apiv2/servers/ACESERV1/deploy?delete-all=false" --header 'accept:application/json' --header 'content-type:application/octet-stream' --header "Content-Disposition: attachment; filename=C:\Toolkit_workspace\ACET12\workspace\BARfiles\httpreqreply.bar' --data-binary @C:\Toolkit_workspace\ACET12\workspace\BARfiles\httpreqreply.bar

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