Mapping Linked APIs

Overview

Linked APIs allow Rapid API integration to connect two APIs to perform an atomic operation. For example, use Linked APIs when a third-party system requires two API calls to complete a fetch operation for a Data Subject. With Linked APIs, you can use the output of the first API as input to the second API.

To map linked APIs, select Linked APIs from the Add New Rest API dropdown list.

Add New Rest API dropdown with Linked APIs selected

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

Add New Rest API window showing tabs for the 1st and 2nd API
Setting Up the 1st API
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 apply 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 with any API method. Set the mapping to Not Required if the current API call is not required, or to Required to require the API call at all times when there are updates and to record integration logs.

1st API Settings tab showing Request/Task, Add Criteria, API Usage, and mapping options
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 the URL, format them as [[${variable}]]. For example: https://www.website.com/[[${variable}]].

You can map Value Mapping attributes multiple times as necessary. At runtime, the values of the IRM attribute mapped multiple times will be passed to the receiving system's mapped attributes.

1st API URL tab showing HTTPS Method, API URL, and URL Parameters fields
3

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

1st API Params tab with Key and Value fields

Headers Tab

1st API Headers tab with Key and Value fields

Body Tab

1st API Body tab with Key and Value fields
4

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

1st API Output tab with JSON body input field

Note: If you delete or change the Output JSON Variable or URL parameter and those keys or parameters are already used 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 must enter an Array Key found in the JSON added in the output tab.

For linked APIs, a saved mapping displays a Dynamic Loop tag if the second API repeats multiple times. At runtime, IRM loops the 2nd API until all records are updated.

Enable dynamic loop checkbox and Array Key field

📋 Note: If dynamic looping is enabled for a linked API with the Fetch Data from Systems use case, IRM adds all of the 2nd API's execution output to the CSV associated with the Data Subject Request or Task.

Changed or Deleted Variables

Error modal shown when Output JSON Variable has been changed or deleted

Changed or Deleted URL Variables

Error modal shown when a URL variable has been changed or deleted

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

Setting Up the 2nd API
1

In the 2nd API Settings tab, note that Migration Criteria, API Usage, and Mapping requirement are disabled — these values are inherited from the 1st API and can only be set there.

2nd API Settings tab with inherited fields shown as disabled
2

In the 2nd API URL tab, select the HTTPS Method and enter the custom API URL and URL Parameters. To use variable keys in the URL, format them as [[${variable}]]. For example: https://www.website.com/[[${variable}]].

2nd API URL tab showing HTTPS Method, API URL, and URL Parameters fields
3

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

Params Tab

2nd API Params tab

Headers Tab

2nd API Headers tab

Body Tab

2nd API Body tab
4

Click Save to save the integration setup, or click Save & Add Another API to add more Linked APIs.

TrustArc  ·  IRM — Rapid API Linked APIs Setup  ·  support.trustarc.com