Skip to main content

Groovy Script

Example

Original Request

New Request

Explanation

This script performs the following operations:
  1. JSON Parse: JSON message coming from request body is parsed
  2. Field Addition: A new field (tamAd) is added using existing fields
  3. JSON Creation: Updated JSON message is created
This script should be run on the request line (Request Policy) because it uses the requestBodyTextFromClient and requestBodyTextToTargetAPI variables.