Blog
  • AI Gateway
  • AI Security
  • AIOps
  • API Security
  • API Gateway
|
    • API Management
    • API Development
    • API Design
    • Automation
    • Service Mesh
    • Insomnia
    • View All Blogs
  1. Home
  2. Blog
  3. Enterprise
  4. Transform Your Requests/Responses With the Kong Reedelk Transformer Plugin
Enterprise
October 23, 2020
4 min read

Transform Your Requests/Responses With the Kong Reedelk Transformer Plugin

Kong

Introduction

Creating an API contract and corresponding Kong service are often just the first steps in the API development process. More often than not, the upstream services that are invoked provide a different contract to the one presented to the API consumer. This is especially the case in larger organizations where enterprise applications offer their own out-of-the-box integration contracts. Likewise, you shouldn't expose the complexity of your upstream systems to your API consumer. So, what's the best way to transform these upstream/downstream requests into something that both sides can understand?

Enter Reedelk, a Kong Hub plugin partner, which provides a platform to develop API data integrations and transformations with a visual designer based on IntelliJ IDEA. Reedelk helps you boost your development productivity by providing pre-built components packaged in modules to get you up and running quickly. By simply dragging and dropping components onto the canvas, you can save a lot of time in comparison to writing code from scratch. Being component-oriented also improves the quality of your implementation due to reusability. There’s also the option of importing your OpenAPI Specification that you designed in Insomnia into Reedelk; this saves you time when building a new API or integration flow.

There are several components available, allowing you to work with different technologies and performing transformations, such as JSON, XML, MongoDB, Google Drive and RDBMS components. There’s the option to develop your own custom components for more ad-hoc requirements.

Running your integration flow alongside Kong is simple - either use a pre-built Reedelk Docker image or create your own. The Reedelk runtime is by design lightweight to meet the need for agile deployments and microservice oriented architectures. Administration is taken care of with a purpose-built console that shows you what you have deployed and where.

Integrating Kong With Reedelk Data Integration Platform

The Reedelk Transformer Plugin can be applied in the Kong upstream phase to transform data before invoking the upstream service or in the downstream phase to transform data returned by the upstream service before returning it to the API user.

The following figure shows the high-level architecture of the Reedelk Transformer plugin for Kong when configured in the downstream phase:

Fig 1: Kong Reedelk Transformer plugin high-level architecture – downstream phase

  1. An API user makes an HTTP request to a Kong route.
  2. Kong forwards the HTTP request to the upstream service.
  3. The upstream service sends the response back to Kong.
  4. The Reedelk Transformer Plugin intercepts the response payload and invokes a Reedelk REST flow using an HTTP POST request with payload containing the data returned by the upstream service.
  5. The Reedelk REST flow applies the transformation to the posted payload and returns the new payload back to the Reedelk plugin.
  6. The Reedelk plugin replaces the original response from the upstream service with the transformed payload from the Reedelk flow and Kong sends the response back to the API user with the new payload.

In the following example, a mobile banking application may need to display different information depending on whether the customer is a private person or a business account. Within the associated OpenAPI Specification, a discriminator is used to handle the various fields accordingly. To resolve this use case with Reedelk, we simply create a new flow, which transforms an incoming request from one JSON structure to another JSON structure according to the value of a JSON property named "customerType."

The Router Component in the flow checks the value of the "customerType" property from the original JSON payload coming from the upstream service: if its value is ‘business' the JSON is transformed in one structure, if its value is ‘private' the JSON is transformed in a different structure with only a subset of the original properties.

Fig 2: Reedelk Flow Designer displaying an integration flow to transform a JSON structure into another JSON structure based on a condition.

Once the Reedelk Transformer plugin for Kong is installed and properly configured, no additional configuration is required in order to integrate Reedelk with Kong and have Reedelk transform the payload passing through the Kong API gateway.

About the Author:

Allan is the co-founder of Reedelk together with his business partner Lorenzo. Allan spent the last twenty years working for large enterprises but now works on his integration platform Reedelk. He lives in Helsinki, the birthplace of Nokia, and is surrounded by many wonderful people. Allan is now working really hard to put his knowledge and passion to good use; please feel free to get in touch with him.

LinkedIn: www.linkedin.com/in/allan-knabe

Twitter: https://twitter.com/reedelk

Github: https://github.com/reedelk/reedelk-runtime

Open SourcePluginsDigital Transformation

More on this topic

eBooks

The AI Connectivity Playbook: How to Build, Govern & Scale AI

Videos

Leveraging Kong for Secure Healthcare Interoperability

See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

Get a Demo
Topics
Open SourcePluginsDigital Transformation
Share on Social
Kong

Recommended posts

Building a geocoding plugin for the Kong Gateway using Python

Kong Logo
EngineeringJune 3, 2022

Recently, I came across a request from one of our community users looking for a Kong plugin that could look up address details based on a few location search keywords. There are many libraries that support geocoding. I decided to pick up a Python Li

Shrikanth Rajgopalan

28 Best Practices for Kong Lua Custom Plugins

Kong Logo
EngineeringJanuary 27, 2022

Ready to speed up your Kong Lua custom plugin development process? 1. Before diving into this post, make sure you're familiar with the basics of plugin development and have gone through the basics described in our Kong documentation . Plugin Devel

Shrikanth Rajgopalan

Michaels' API Transformation: Crafting API Excellence with Kong

Kong Logo
EnterpriseOctober 23, 2024

Walk into any of the over 1,300 Michaels stores in the US or Canada, and you can’t help but be inspired. Since 1973, the arts and crafts specialty retailer has been sparking creativity for millions. But behind Michaels’ operations, there’s creativit

Kong

Why Your Engineers Want to Migrate to Kubernetes

Kong Logo
EnterpriseJune 11, 2024

In today's rapidly evolving technological landscape, software teams have found themselves at the heart of business strategy. Their decisions on which technologies to invest in have become crucial, directly impacting a company's agility and ability t

Kong

Kong Gateway Enterprise 3.3.x.x EOL

Kong Logo
EnterpriseMarch 29, 2024

As of May 2024, Kong Gateway Enterprise 3.3.x.x will enter its End Of Life (EOL) phase and will no longer be a part of the full support cycle. Following this, Kong Gateway Enterprise 3.3.x.x will enter a 12-month sunset support period, exclusively f

Veena Rajarathna

API Platform Engineering Maturity Model

Kong Logo
EnterpriseMarch 6, 2024

APIs have become fundamental to the digital economy, enabling integration and communication between different systems and services. A mature API platform is not just a technical achievement but a strategic asset that can drive innovation, efficiency

Jordi Fernandez Moledo

The Path to Commercial Open Banking: Insights from the UK

Kong Logo
EnterpriseJanuary 26, 2024

Open Banking is a phrase used around the world that describes a new way of engaging with banks. If we consider the 20-plus countries that have embraced the concept, they all have taken a slightly different approach than the UK, the first territory

Simon Lyons

Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

Get a Demo
Powering the API world

Increase developer productivity, security, and performance at scale with the unified platform for API management, AI gateways, service mesh, and ingress controller.

Sign up for Kong newsletter

    • Platform
    • Kong Konnect
    • Kong Gateway
    • Kong AI Gateway
    • Kong Insomnia
    • Developer Portal
    • Gateway Manager
    • Cloud Gateway
    • Get a Demo
    • Explore More
    • Open Banking API Solutions
    • API Governance Solutions
    • Istio API Gateway Integration
    • Kubernetes API Management
    • API Gateway: Build vs Buy
    • Kong vs Postman
    • Kong vs MuleSoft
    • Kong vs Apigee
    • Documentation
    • Kong Konnect Docs
    • Kong Gateway Docs
    • Kong Mesh Docs
    • Kong AI Gateway
    • Kong Insomnia Docs
    • Kong Plugin Hub
    • Open Source
    • Kong Gateway
    • Kuma
    • Insomnia
    • Kong Community
    • Company
    • About Kong
    • Customers
    • Careers
    • Press
    • Events
    • Contact
    • Pricing
  • Terms
  • Privacy
  • Trust and Compliance
  • © Kong Inc. 2025