How to use FTL in API
FTL [FreeMarker Template Language] in vConnect is used for templates.
Steps for that are:
- Go to API management.
- While configuring any API, In End point details you will get an option of ‘Request Transformation’ on the right side. Which is used to transform the request or response accordingly.
- In that we have different options: ‘Simple request’ is for response transformation. whereas, ‘Complex’ is for response and request both.
- After providing that , You have to provide the params in ‘Template Body Parameters Mapping’ section.
For example:
{
"name": "${name}",
"mobileNo": ${mobileNo},
"password": "${password}",
"designation": "${designation}",
"branch": ${branch},
"department": "${department}",
"status": "${status}",
"empcode": "${empcode}",
"role": "${role}"
}