Effortless API creation with full API lifecycle using Red Hat Integration (Part 1)
Nowadays, API development with proper lifecycle management often takes days if not weeks to get a simple API service up and running. One of the main reasons behind this is there are always way too many parties involved in the process. Plus there are hours of development and configuration.
First, the system analysts negotiate the API interface with the API consumer; then the developer writes the actual API to implement the interface. They then pass the API on to the DevOps team that is in charge of deploying the API. And it is not done yet; then the deployment info needs to be passed to the operations team that is in charge of setting up the API endpoints in the management system and also applying the access policies.
The speed of providing managed API services can be one of the major factors in the success of a company’s business.
This article, which is the first in a series of three articles, describes how the new Red Hat Integration bundle allows citizen integrators to quickly provide an API through tools that make creating an API in five simple steps effortless.
Red Hat Integration bundle allows you to quickly provide an API in five simple steps:
1. Intuitively design OpenAPI standard documentation.
2. Implement the API right after its definition.
3. Deploy the API on the cloud in no time.
4. Automatically discover services and load the API into the management system.
5. Apply policies to protect and manage the API and you are ready to go!
In this demo, a wine distributor provides labeling and ranking info to its partner via APIs. The distributor already has a system, but this new partner—the biggest mobile supermarket in the region—wants to have its own data and format for its apps. And it wants to have the service ASAP. Let’s see how the wine distributor can benefit from using Red Hat Integration.
Take a quick look at the following video, in which I show how to quickly develop and apply the full API lifecycle in just five simple steps
What’s going on behind the scenes?
Everything looks easy to make this happen, but let’s see what’s going on behind the scenes.
Red Hat Fuse Online, the low-code integration platform, and also other resources all need to be live on top of OpenShift to allow for standardization. The data source is coming from a database in a separate namespace. To expose the data from the internal data source to the API, the citizen developer defines the API using Apicurio, which generates OpenAPI standard documentation that is later referenced and used in the implementation phase.
The implementation itself is fairly quick; it simply maps the input parameters to the select SQL and maps the output to the exported result. Fuse online will then take your integration config and store it in the internal database.
Meanwhile, the source-to-image (S2I) process will kickstart, which builds the application into a container that is then deployed as a Kubernetes pod on the cloud platform. After the build is the deployment. During the deployment, a Kubernetes service is created, and this service acts as the internal proxy/load balancer to the back end running the pod.
To protect the API from external attacks, unwanted access, and any other security concerns, Red Hat 3scale API Management is used to protect the API endpoints by selecting the method of protection: authenticating by a simple API key, by Auth 2.0, or by other SSO methods. This sets the path and policies for accessing the API and determines who is allowed to access the API. But how does 3scale API Management know where to look for the internal endpoints?
- Smart discovery. 3scale API Management automatically detects the Kubernetes service that is labeled “true.” Please note that you will need to allow 3scale API Management to have privileges such as cluster-wide visibility or authorize view to see the services on the cluster.
- To allow Red Hat Fuse Online to label the services for you so it can be discovered by 3scale, you will need to set CONTROLLER EXPOSE VIA 3SCALE to true.
- After that, the API will be available, protected, and secured to all the clients.
That is what happened behind the scenes during the complete API lifecycle. Take a look at this video, which walks you through what’s behind the scenes.
Hope you enjoy using Red Hat Integration!