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:
- Click the Create Product button under the APIs heading on the dashboard (Figure 7). This will load the New Product screen.
- 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.
- After selecting the Import from OpenShift option you will be able to use the dropdown fields to select:
- The Namespace that contains your Quarkus application
- The rhoam-quarkus-api application
- 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.
Verify that the API product and backend are configured correctly:
- Select your API from the Products list to visit the Overview screen.
- Click the ActiveDocs link on the left and verify that the rhoam-quarkus-openapi OAS 3.0 specification was imported (Figure 10).
- Expand the dropdown menu in the top navigation and select Backends (Figure 11).
- 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.