REST V2 Connector Guide > REST Operations > REST Target Operations
  

REST Target Operations

Create a Target transformation in the Mapping Designer to write data to a web service application. When you select a REST connection for a Target transformation in a mapping, you can select an operation based on the object configured in the connection. When you want to write data that is in relational format to the web service application, the Secure Agent converts the relational data to a hierarchical format before writing to web service application.
When you configure a web service application target, you can select Operations on the Target tab to display the list of valid operations. The Secure Agent creates target fields based on the request message structure of the operation you select on the Target tab.
When you write data to a web service application, the Secure Agent includes all the incoming fields from the source, by default. You can exclude the incoming fields, if required. You can add multiple input sources to write data to a web service application target object and define the primary and foreign key relationships between the input sources before you run the mapping. Each input source appears as separate group in the Field Mapping tab in the target transformation. You can define key relationships in the Field Mapping tab.

Field Mapping in a Target Transformation

You can map fields that are in a relational structure to the hierarchical structure used by the web service application.
On the Field Mapping tab for the Target transformation, the fields in the Target Fields appear in hierarchical format. The target fields are determined by the request message structure of the operation you select for the Target transformation.
Each source object displays as a group in the Input Fields area. You can select fields in the Input Fields area to map the fields to the request. If the input fields include multiple input groups, map the groups to the corresponding nodes in the request. Be sure to map all of the fields that you require in the request.
The following image shows an example of mapped input fields from the source file with the web service application target in an operation for updating employee details:

Configuring a Multiple Request for the REST Target

To construct multiple requests, define a primary key and foreign key for source groups.
If the request contains an element, for example, ID element, that occurs multiple times, the input fields must come from different source groups. 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 multioccurring elements, you must perform the following steps:
When you do not have multioccurring elements, you can define the primary key for the source fields and then map the fields.