Creating a Common Architecture for a REST API

Wednesday, November 19, 2014

Picture of Raman Singh
Raman Singh

In this example we will show how to create a common architecture for a REST API that transforms any data dynamically based on the type of request parameters and payload being sent to this API. Key takeaway of this architecture is that creating a common template for data integrations allows easy management and reusability of services.

For example here’s an API that takes the following request and generates the desired output.

Request

  • Mapping ID
  • Schema ID
  • Schema Type
  • Payload (data that needs conversion)

Response

  • Output from the mapping (converted data)

Based on the Mapping and Schema ID, the common template would automatically override the placeholder activities in the flow with actual schema and mapping activities and produce the output based on the request.

Using this approach one common service converts any source data by calling the appropriate mapping activity. Source data can be of any format such as EDI, Text, Fixed Length, XML and the mapping would create the output as per your format.

Refer to the video on how to setup a common service that transforms data from one format to another.