Mapping Linked APIs

Linked APIs allow Rapid API integration to connect two APIs to do an atomic operation. For example, we can use the ‘Linked API’ if the use case is to fetch data for Data Subjects from a third party system and that third party system requires two APIs to do the fetch operation. On Linked APIs, you can use the output of the first API as an input on the second API.

To map linked APIs, select Linked APIs from the Add New Rest API dropdown list to begin adding migration criteria and setting up the integration.

Then, in the Add New Rest API window, set up the 1st and 2nd API.

Setting Up the 1st API

To set up the 1st API, follow the steps outlined below.

  1. In the 1st API Settings tab, select whether the integration is for Request or Task. Then, click Add Criteria to add the criteria to be applied on the map. You can select multiple criteria as needed. Select a use case for API Usage from the list. Each use case can pair to any API method. Then, set the mapping to Not Required if the current API call is not required, or set it to Required to require the API calls at all times if there are updates and to record the integration logs.



  2. In the 1st API URL tab, select the HTTPS Method to use in the workflow and enter the custom API URL and URL Parameters. To use Variable Keys in URL input, it must be formatted specifically as [[${variable}]]. For example, https://www.website.com/[[${variable}]].

    You can map Value Mapping attributes multiple times as necessary. When run time is executed, the values of the IRM attribute mapped multiple times will then be passed to the receiving system’s mapped attributes.


  1. In the 1st API Params, Headers, and Body tabs, enter the keys and select a value for each key. You can also edit and delete the parameters you added.

Params Tab

Headers Tab

Body Tab

  1. In the 1st API Output tab, input a JSON body to be used as input to the 2nd API.



    If you delete or change the Output JSON Variable or the URL parameter and the keys or parameters are already used in the 2nd API or mapped in the 2nd API, an error message displays in the modal and in the log when you execute the integration.

    Select the Enable dynamic loop checkbox to  run the linked second API multiple times, looping through a particular output structure of the first API. When enabled, you are required to enter an Array Key found in the JSON added in the output tab.

    For linked APIs, a saved mapping contains a Dynamic Loop tag if the second API repeats multiple times. When run time is executed, IRM then loops the 2nd API multiple times until all records are updated.



    If dynamic looping is enabled for a linked API with Fetch Data from Systems use case, then IRM adds all the second API’s execution output to the CSV associated with the Data Subject Request or Task.

Changed or Deleted Variables

 

Changed or Deleted URL Variables

If you change the JSON variable (or URL variable) in the 1st API, IRM displays a warning that states, “Changing the JSON variable (or URL variable) will result to loss in mapping connection with the 2nd API."

 

Setting Up the 2nd API

To set up the 2nd API, follow the steps outlined below.

  1. In the 2nd API Settings tab, note that the components such as Migration Criteria, API Usage, and Mapping requirement are disabled since the values are inherited and can only be set in the 1st API.



  2. In the 2nd API URL tab, select the HTTPS Method to use in the workflow and enter the custom API URL and URL Parameters. To use Variable Keys in URL input, it must be formatted specifically as [[${variable}]]. For example, https://www.website.com/[[${variable}]].



  3. The 2nd API Params, Headers, and Body tabs, contain the form metadata, fields, and the 2nd API Output variable.

    Params Tab

Headers Tab

Body Tab

  1. Click Save to save the integration setup or you can also click Save & Add Another API to add more Linked APIs.