Current location - Quotes Website - Signature design - How to design an integration process exposed as a json-based API
How to design an integration process exposed as a json-based API

Part 2 shows how to build an orchestration that calls the JSON-based REST API exposed by Salesforce.com to create an account. Part 3 shows how to design an integration process exposed as a JSON-based API.

WebSphere Cast Iron (hereafter referred to as Cast Iron) is widely used for integration and migration throughout internal and external applications. In the past, JSON was commonly used as the transport type for REST APIs because its format is lightweight compared to XML.

In Cast Iron, you can create and expose a JSON-based API, which is an integrated process that accepts requests and sends responses in JSON format. Cast Iron uses XML and XML schemas. Cast Iron introduces two new activities for working with JSON data: Read JSON and Write JSON. These activities are useful during the creation of integration processes that represent JSON-based APIs in Cast Iron. This article describes how to create an integration process exposed as an API that can receive and emit JSON data.

Building a JSON-based API to add two numbers in Cast Iron

In this scenario, you will learn how to expose a REST API by using Read JSON and Write JSON The activity receives a request with two numbers and responds by sending the sum of the input numbers in a JSON message. Sample request and response JSON messages are shown in Table 1.

Table 1. Adding two API sample request and response JSON message numbers.