Developing integration solutions by using REST APIs

Use REST APIs to expose integrations as a RESTful web service that can be called by HTTP clients.

Before you begin

If you are not familiar with message flow concepts, message model concepts, and common tasks to manage message flow resources, see Developing message flows and Constructing message models.

About this task

In IBM® App Connect Enterprise, a REST API is a specialized application. A REST API contains a set of resources, and a set of operations that can be called on those resources. The operations in a REST API can be called from any HTTP client, including client-side JavaScript code that is running in a web browser. For more information, see REST APIs.

The definitions of the resources and operations that are available within a REST API are specified in a Swagger document, an open specification for defining REST APIs. For more information, see Swagger.

IBM App Connect Enterprise also provides a set of REST nodes, which you can use to interact either synchronously or asynchronously with external REST APIs and IBM App Connect Enterprise REST APIs. For information about using these REST nodes, see Connecting to external REST APIs.

Procedure

To create an integration solution that uses a REST API, complete the following steps:

  1. Create a REST API in the IBM Integration Toolkit, by following the steps in one of the following topics:
  2. If you created the REST API from scratch by using the REST API Editor in the IBM App Connect Enterprise Toolkit, you must now define the resources, models, and operations in the REST API, by following the steps in Defining resources, models, and operations in a REST API.
    However, if you created the REST API from an imported Swagger document, you can ignore this step and go to step 3
  3. Implement each of the operations in the REST API as a subflow, as described in Implementing an operation in a REST API.
  4. Optional: Implement error handling for the REST API as a set of subflows, as described in Implementing an error handler in a REST API.
  5. Optional: Secure your REST API by using HTTPS for encrypting communications between client and server, as described in Securing a REST API by using HTTPS.
  6. Optional: Secure your REST API by authenticating users with HTTP Basic Authentication, as described in Securing a REST API by using HTTP Basic Authentication.
  7. Optional: If your REST API is going to be used by client-side code that is running in a web browser, you might have to configure Cross-Origin Resource Sharing (CORS). See Permitting web browsers to access a REST API by using Cross-Origin Resource Sharing for more information.
  8. Optional: REST APIs are configured by default to handle JSON data. If you want to handle non-JSON data in your REST API, see Handling non-JSON data in a REST API.

Results

You have developed an integration solution that uses a REST API.

What to do next