Transforming messages in API Gateways

Last modified by Eva Torken on 2023/08/24 13:39

In the crash course on 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 front end and the backend of the API Gateway. We will see that the functionality is similar compared to what we see within 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 on 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 front end and the backend of the API Gateway. We will see that the functionality is similar compared to what we see within other patterns.

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)

As the transformation process works the same across patterns, it is pointless 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).

intermediate-configuring-the-api-gateway-transforming-messages--operation-options-transformation.png

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 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)
  • To activate the transformation capabilities, you should select the Transformation option on the operation level in the Design phase.

5. Suggested Additional Readings

If you are interested in this topic and want more information on it, please read the release notes provided by eMagiz