About this task
To create a REST API in
IBM Integration Bus,
you can use the
Create a REST API wizard in the
IBM Integration Toolkit to import a
Swagger document. You must then
create the REST API and other project artifacts that are required
to implement and deploy the new REST API. Alternatively, you can create
a REST API by defining the models, resources, and operations from
scratch, as described in
Creating a REST API from scratch by using the IBM Integration Toolkit.
Procedure
To create a REST API by importing a Swagger document, complete the following
steps:
- Open the Create a REST API wizard
by clicking .
- Enter a name for the REST API. The name that
you specify is used as the name of the project in the IBM Integration Toolkit.
- Select Import resources and operations defined
in a Swagger document and then click Next.
- Select the path to the Swagger document
that describes the resources and operations that you want in the REST
API. You can import the Swagger document from the file system
or from an existing project in the workspace. The
file is validated for use in a REST API. If any errors are found while
the selected Swagger document
is validated, those validation errors are displayed at the top of
the wizard. You cannot proceed if validation errors are found in the
selected Swagger document.
- Optional: To review the list of resources and
operations that are contained in the selected Swagger document, click Next.
- To finish creating the REST API, click Finish. The REST API Description for the
new REST API opens automatically, which you can use to implement operations
as described in Implementing an operation in a REST API.
Results
The REST API is created.
What to do next
Implement each of the operations in the REST API as a subflow,
see
Implementing an operation in a REST API.