REST V2 Connector > REST V2 operations > Configuring a request that contains array elements
  

Configuring a request that contains array elements

You can construct a request for a REST V2 target and REST V2 midstream transformation that contains array elements using one of the following methods:
Note: You cannot configure unnamed arrays in the request body.

Creating a request using multiple source groups

If the request message contains an element, for example, phone number of type work of an employee, that occurs multiple times, the input fields for this element must come from different source groups.
To create a request for relational sources, link the source group in the input fields to its parent source group by using the foreign key.
To decide the parent source group for multi-occurring elements, you must perform the following steps:
For example, the following image shows the mapping of the multi-occurring element work from the relational data source to the REST V2 target:

Creating a request using a single source group

To create a request using a denormalized source for a midstream transformation or REST V2 target, perform the following steps:
  1. 1Include all the fields in a single source file. Ensure that the multi-occuring elements are the last fields in the denormalized source file.
  2. 2Click Administrator > Runtime Environments and select an agent.
  3. 3Add a new property under Custom Configuration Details.
  4. 4Select Service as Data Integration Server and Type as Tomcat.
  5. 5Specify the name of the property as ALLOW_DUPLICATE_VALUES.
  6. 6Set the value to true.
  7. 7Click Done to save the changes.
  8. 8Map the corresponding source to target fields.
For example, the following image shows the mapping of the field work to an array element of REST V2 target: