Packaging and deploying a REST API

Package your REST API into a BAR file and deploy it to an integration server.

Before you begin

You can create a REST API in the IBM® App Connect Enterprise Toolkit, as described in Creating a REST API.

About this task

REST APIs can be deployed to integration servers that are configured to use the integration server HTTP listener.

If you plan to deploy more than one REST API to an integration server, the REST APIs must have different base paths.

Procedure

To package a REST API into a BAR file and deploy it to an integration server, complete the following steps:

  1. Package the REST API into a BAR file.
    You can use either the BAR file editor, or you can use the command line. Both the mqsicreatebar and mqsipackagebar commands package a REST API into a BAR file. When you use these commands, pass the name of the REST API in as the application name.
    For example:
    mqsicreatebar -data workspaceDirectory -b restApiName.bar -a restApiName
    mqsipackagebar -a restApiName.bar -k restApiName
  2. Deploy the REST API to the integration server.
    You can use the IBM App Connect Enterprise Toolkit, the web user interface, or the mqsideploy command; for example:
    mqsideploy integrationNodeName -e integrationServerName -a restApiName.bar
    
    mqsideploy -i ipAddress -p port -a C:\myworkspace\myapi1\restApiName.bar
    If another REST API is deployed to the integration server and that REST API has a clashing base path, the deployment of the REST API fails. You cannot deploy REST APIs that have clashing base paths to the same integration server.

Results

Your REST API is deployed.