Skip to main content

APIRESPONSE

note
  • This tranformer can only be used with REST trigger.
  • The flow must contain atleast one APIRESPONSE element in it when REST trigger used.

Transformer Configuration

  1. Drag and drop APIRESPONSE Transformer from the pallet.
APIRESPONSE transformer
  1. Left click on APIRESPONSE Transformer and Configure as given below.
  2. Provide status code.
  3. Click on the Drop down and select Content Type application/json.

Mapping Types

FieldsDescription
GENGet one field from the input and mapped in another field of output
TRANSTransforms the input value with the help of inline transformation functions
CNMapped the input as it is in output body
OBJCreates a object with target name as key
ARMapped the input into an array

1. TRANS

  1. From Dropdown select TRANS - Transforms the Input value with the help of inline transformation functions.
  2. Click on the add button. You will see Inline functions, click on + icon.
  3. Select Utils and Constant from dropdown. Add Parameters as Hello world and Save.
  4. The configuration of the APIRESPONSE Transformer appears as follows:
  • Target - In target write Status and you will find Key as below
  • Key - Utils.constant(Hello world)

2. CN

From Dropdown select CN - Mapped the input as it is in output body.

Constant mapping

3. AR

From Dropdown select AR - Mapped the input into an array.

Array mapping

4. GEN

From Dropdown select GEN - Get one field from the input and mapped in another field of output.

Key & value pair mapping

5. OBJ

From Dropdown select OBJ - Creates a object with target name as key.

Object mapping

Mapping view

View response structure side by side as you create mapping.

note
  • The mapping view only shows JSON.
  • It does not shows the response structure for other types like XML.