Import Quarkus API using API Management’s Service Discovery feature

An API in OpenShift API Management is referred to as a product. Products can have one or many backends. A backend is a web service to which OpenShift API Management will direct requests as a proxy, based on mapping rules defined by the product. The Quarkus application you deployed is a backend that will be part of the API product.

Create a product and a backend as follows:

  1. Click the Create Product button under the APIs heading on the dashboard (Figure 7). This will load the New Product screen.
The OpenShift API Management dashboard offers a Create Product button under APIs.
Figure 7: The OpenShift API Management dashboard offers a Create Product button under APIs.

 

  1. Select the Import from OpenShift option (Figure 8). If this option is grayed out, click the (Authenticate to enable this option) link to enable it.
Choose the “Import from OpenShift” option.
Figure 8: Choose the “Import from OpenShift” option.

 

  1. After selecting the Import from OpenShift option you will be able to use the dropdown fields to select:
    1. The Namespace that contains your Quarkus application
    2. The rhoam-quarkus-api application
  2. Click the Create Product button.

You will be redirected back to the OpenShift API Management dashboard, where your new API product is listed (Figure 9). If your API isn’t listed in the APIs section after a few moments, try refreshing the page.

The new rhoam-quarkus-openapi product has been added correctly
Figure 9: The new rhoam-quarkus-openapi product has been added correctly

 

Verify that the API product and backend are configured correctly:

  1. Select your API from the Products list to visit the Overview screen.
  2. Click the ActiveDocs link on the left and verify that the rhoam-quarkus-openapi OAS 3.0 specification was imported (Figure 10).
The ActiveDocs page can verify that the rhoam-quarkus-openapi OAS 3.0 spec is imported.
Figure 10: The ActiveDocs page can verify that the rhoam-quarkus-openapi OAS 3.0 spec is imported.

 

The Backends page lists all the backends that have been created.
Figure 11. The Backends page lists all the backends that have been created.

 

  1. Expand the dropdown menu in the top navigation and select Backends (Figure 11).
  2. Verify that your rhoam-quarkus-openapi backend is listed. You should also see that it's using a private service URL, such as http://rhoam-quarkus-openapi.rhoam-demo.svc.cluster.local:8080. OpenShift API Management will proxy incoming HTTPS requests to this private service URL.