Transforming messages in API Gateways
In this microlearning module, we will dive into the process of transforming messages within the API Gateway pattern. Building on our previous lessons on the API Gateway basics and passthrough cases, we will now explore how to modify the structure of data as it moves between the frontend and backend. This transformation capability enhances the functionality of the API Gateway and aligns with similar processes found in other patterns.
Should you have any questions, please get in touch with academy@emagiz.com.
1. Prerequisites
- Intermediate knowledge of the eMagiz platform
- Basic knowledge of the API Gateway pattern
2. Key concepts
This microlearning is about transforming messages within the API Gateway pattern.
- By transforming messages, we mean: Changing the structure of the data from what you receive to what you want to send to the backend operation.
Interesting points to consider are:
- The transformation process works similarly across patterns
- The benefit of having the transformation capability is that it expands the capabilities of the API Gateway. This fact makes it more attractive to use the eMagiz API Gateway
- You can transform from the different messaging formats (including itself) with the standard transformation functionality (for the API Gateway)
3. Transforming messages
In the Crash Course of API Gateway, we learned the basics of the API Gateway pattern. Then, we focused on what we call passthrough cases. Now, we will focus on transforming messages between the frontend and the backend of the API Gateway. We will see that the functionality is similar compared to what we see within other patterns.
As the transformation process works the same across patterns, we don't have to discuss the message mapping again in this microlearning. If you would like to learn more about message mapping, please check out the Crash Course Platform Module. To enable the transformation capabilities of the API Gateway, you can determine on operation level which type of integration you want (passthrough or transformation).
As you have probably noticed, you do not have to select a backend operation if you choose the transformation option. The backend can now also represent a SOAP web service, a database, or something else that gives back a response after the message is delivered to it.
After you have moved the operation to Create, you can edit the Create transformation in the same manner as you are used to within other patterns, and all possibilities will be the same.
4. Key takeaways
- The method for transforming messages within the API Gateway is consistent with transformation processes in other patterns.
- The transformation capability significantly expands the API Gateway’s functionality, making it a more versatile tool within the eMagiz platform.
- The API Gateway supports transforming various messaging formats, including its own, using standard transformation functionalities.
- To use the transformation features, select the Transformation option at the operation level during the Design phase.
5. Suggested Additional Readings
If you are interested in this topic and want more information on it please read the help text and release notes provided by eMagiz, and read the following links: