Creating a new REST API that uses artifacts from an existing REST API

Deploy multiple versions of the same REST API simultaneously by copying REST API artifacts into a new REST API project.

Before you begin

You must create a REST API in the IBM® Integration Toolkit, see Creating a REST API.

About this task

To create multiple versions of the same REST API, you can copy artifacts from an existing REST API into a new REST API.

Note: If you want to deploy the new and existing REST APIs on the same integration server, you must specify a different base path for each of them. Use the Modify button (REST API modify button) in the REST API editor to modify the resource paths.

Procedure

To create a new REST API that uses artifacts from an existing REST API complete the following steps.

  1. Create a REST API project in the IBM Integration Toolkit.
    If the existing REST API project is in the currently open workspace, you must specify a different name for the new REST API project. If you modified the REST API project, modify the resource path by using the Modify button in the REST API editor.
  2. Open the REST API Description for the new REST API project.
  3. In the REST API Description, implement operations and error handlers from the existing REST API project.
    1. For all operations that you want to implement, click the Implement the Operation link.
    2. For all error handlers that you want to implement, click the Implement the Error Handler link.
    This action creates the connections from the REST API project to the subflows.
    Note: Do not add any message flow nodes to the generated subflows.
  4. Copy the subflows for implemented operations and error handlers from the existing REST API project into the new REST API project.
    Copying subflows from the existing REST API overwrites the subflows that are generated in the previous step.
  5. Reference any static or shared libraries in the new REST API project that are referenced by the existing REST API, see Referencing resources in other libraries.
  6. Copy all other artifacts, for example, subflows, schemas, and maps, from the existing REST API project into the new REST API project.

Results

You have created a new REST API by reusing artifacts from an existing REST API.

What to do next

You must package and deploy your REST API to an integration server, see Packaging and deploying a REST API.