Implementing an operation for REST APIs based on OpenAPI 3.0 documents

Use the REST API Editor in the Application Development view or the OpenAPI Editor to implement operations in a REST API.

Before you begin

About this task

Operations in a REST API are implemented as a subflow, and you can use the RESTAPI Editor or the OpenAPI editor to create an empty subflow for each operation. You can then implement the operation by adding any of the standard IBM App Connect Enterprise message flow nodes to the subflow.

If you do not implement an operation, you can still deploy the REST API to an integration server. However, when an HTTP client attempts to call an operation that is not implemented, an HTTP 501 Not Implemented status code is returned to the client.

You can use the OpenAPI Editor to create, edit, and delete subflows for operations for OpenAPI 3.0 based REST APIs.

Procedure

To implement an operation in a REST API, complete the following steps:

  1. Open the REST API Description by double-clicking the REST API project or by right-clicking and selecting Open.
    The REST API editor for OpenAPI 3.0 documents opens and provides a view of the API details, its Resources and Operations, Error handling, Security, and Message Validation Settings.
  2. In the RESTPI Editor, open the REST API that contains the operation that you want to implement.
  3. In the REST API Editor for OpenAPI 3.0, locate the operation in the Resources and Operations section and click Create Subflow. Alternatively, if you are working with the REST API in the OpenAPI editor , locate the operation and click Create Subflow.
    The new subflow is opened. You are prompted to confirm that you want to save the REST API. Saving the RESTAPI ensures that the nodes that you add to the subflow are correctly defined with the current definition of the REST API. The subflow is opened in the Message Flow Editor, and it is brought to the front. If you already created a subflow, the actions Edit Subflow and Delete Subflow are provided instead of Create Subflow.
  4. Implement the operation by adding any of the standard IBM App Connect Enterprise message flow nodes to the subflow.
  5. Access the REST API operation information, REST API operation parameters, and REST API request and response body, as described in Implementing REST API operation processing in the subflow by using message flow nodes.

Results

The operation is implemented in the REST API.

What to do next

You must package and deploy your REST API to an integration server, as described in Packaging and deploying a REST API.
You can also complete the following optional tasks: