Create an API Using a Service¶
The service catalog in WSO2 API Manager contains services that correspond to either the Micro Integrator or the Streaming Integrator. The Micro Integrator services correspond to the REST API backend services, and the Streaming Integrator services correspond to the Streaming API (i.e., WebSocket, WebHook/WebSub or SSE) backend services that are managed by the respective integration layer (Micro Integrator or Streaming Integrator).
Therefore, you can use the respective services to either create REST APIs or Streaming APIs to expose integration services or streaming integration services as managed APIs.
Step 1 - Create and publish your service to the service catalog¶
Create and publish your integration service or streaming integration service to the Service Catalog of the WSO2 API-M layer via the integration layer.
For information on creating and publishing a REST API based on an integration service, see Exposing an Integration Service as a Managed API.
For information on creating and publishing a Streaming API based on a streaming integration service, see Exposing a Stream as a Managed API.
Step 2 - Discover the services¶
Follow the instructions below to discover the integration services:
Sign in to the Publisher.
For testing purposes, you can use
adminas the username and password.
Click on the Hamburger in the upper left corner of the Publisher and click Service Catalog as shown below.
The available integration services appear.
Step 3 - Optionally, view the details of the service¶
Click on the service that is in the service catalog to view the service details.
You can view the service name, version, description, usages in APIs, and other important metadata.
Optionally, download a service definition.
If required, click Download to download the service definition.
Optionally, view the service definition.
If you want to see the service definition before creating an API, click View Definition.
Step 4 - Create an API from the service¶
Click on the service that is in the service catalog.
Click Create API.
This opens the Create API dialog box with the API details that are generated based on the service.
Update the API name, context, and version if required, and click Create API.
The overview page of the API that you just created appears.
Update the portal configurations and API configurations as required.
Now, you have successfully created an API using a service.
After you complete configuring the API, Publish the API.
Learn more on the concepts that you need to know when creating an API:
- API Security
- Rate Limiting:
- Life Cycle Management
- API Monetization
- API Visibility
- API Documentation
- Custom Properties