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.

More information:

Step 2 - Discover the services

Follow the instructions below to discover the integration services:

  1. Sign in to the Publisher.

    https://<hostname>:9443/publisher

    For testing purposes, you can use https://localhost:9443/publisher and admin as the username and password.

  2. Click Services.

    open service catalog

    The available integration services appear.

    service catalog listings

Step 3 - Optionally, view the details of the service

  1. 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.

    service overview

  2. Optionally, download a service definition.

    If required, click Download to download the service definition.

  3. Optionally, view the service definition.

    If you want to see the service definition before creating an API, click View Definition.

    view api definition

Step 4 - Create an API from the service

  1. Click on the service that is in the service catalog.

  2. Click Create API.

    This opens the Create API dialog box with the API details that are generated based on the service.

    create api dialog box

  3. Update the API name, context, and version if required, and click Create API.

    The overview page of the API that you just created appears.

    apis list

  4. 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.

See Also

Learn more on the concepts that you need to know when creating an API:

Top