Response Transformations
Response transformations let you post-process endpoint responses before variable extraction and dependency mapping. This is useful for reshaping API responses, normalizing nested structures, or filtering irrelevant data.
Overview
Transformations are a chain of operations applied in sequence to the endpoint's response data. Each step takes the output of the previous step as its input. The transformed result is what gets used for variable extraction and downstream mappings.
Available Transformations
Flatten
Flatten nested objects into a single level with dot-separated keys.
| Field | Description |
|---|---|
| Source path | JSON path to the object to flatten (leave empty for root) |
| Separator | Character between nested keys (default: .) |
| Max depth | How many levels deep to flatten |
Before:
{ "user": { "profile": { "name": "Alice", "age": 30 } } }
After (separator: .):
{ "user.profile.name": "Alice", "user.profile.age": 30 }
Rename
Rename fields in the response.
| Field | Description |
|---|---|
| Field mapping | Old name → new name pairs |
Before:
{ "usr_id": "123", "usr_name": "Alice" }
After (rename usr_id→userId, usr_name→userName):
{ "userId": "123", "userName": "Alice" }
Filter
Filter array items by a condition.
| Field | Description |
|---|---|
| Array path | Path to the array to filter |
| Field | Which field on each item to check |
| Operator | equals, not_equals, contains, starts_with, ends_with, exists |
| Value | Value to compare against |
Before:
[
{ "type": "page", "id": "p1" },
{ "type": "database", "id": "d1" },
{ "type": "page", "id": "p2" }
]
After (filter: type equals "page"):
[
{ "type": "page", "id": "p1" },
{ "type": "page", "id": "p2" }
]
Map
Extract specific fields from each item in an array.
| Field | Description |
|---|---|
| Array path | Path to the array |
| Fields | Comma-separated list of field names to keep |
Before:
[
{ "id": "1", "name": "Alice", "email": "a@x.com", "metadata": {...} },
{ "id": "2", "name": "Bob", "email": "b@x.com", "metadata": {...} }
]
After (map fields: id, name):
[
{ "id": "1", "name": "Alice" },
{ "id": "2", "name": "Bob" }
]
Pick
Keep only specified top-level fields, removing everything else.
| Field | Description |
|---|---|
| Fields | Comma-separated list of fields to keep |
Before:
{ "data": [...], "meta": {...}, "links": {...}, "debug": {...} }
After (pick: data, meta):
{ "data": [...], "meta": {...} }
Omit
Remove specified top-level fields, keeping everything else.
| Field | Description |
|---|---|
| Fields | Comma-separated list of fields to remove |
Before:
{ "data": [...], "meta": {...}, "links": {...}, "debug": {...} }
After (omit: links, debug):
{ "data": [...], "meta": {...} }
Combine
Combine multiple fields into a single field.
| Field | Description |
|---|---|
| Source fields | Fields to combine |
| Target field | Name of the combined field |
| Mode | concat (join strings), object (merge into an object), array (collect into an array) |
| Separator | For concat mode, character between values |
Before (concat mode, separator: " "):
{ "firstName": "Alice", "lastName": "Smith" }
After (combine firstName+lastName → fullName):
{ "firstName": "Alice", "lastName": "Smith", "fullName": "Alice Smith" }
Using the Transformation Editor
Adding Transformations
- Open an endpoint's configuration
- Find the Response Transformations section
- Click Add Transformation
- Select the transformation type
- Configure the operation parameters
Ordering
Transformations execute in order from top to bottom. Use the drag handles to reorder steps. The output of each step becomes the input for the next.
Enable/Disable
Each transformation step has a toggle to enable or disable it without removing it. This is useful for testing — disable a step to see how the chain behaves without it.
Live Preview
The editor shows a side-by-side preview:
- Original: The raw endpoint response
- Transformed: The result after all enabled transformations
This updates in real-time as you modify the chain, making it easy to verify your transformations produce the expected output.
When to Use Transformations
- Nested responses: Flatten deeply nested structures for easier variable extraction
- Inconsistent field names: Rename fields to a consistent schema
- Mixed-type arrays: Filter array items to only the types you need
- Large responses: Pick/omit to reduce data before extraction
- Composite values: Combine fields that need to be used together
Best Practices
- Keep chains short — Fewer steps are easier to understand and debug
- Use the preview — Verify each step produces expected output
- Filter early — Put filter operations before map/pick to reduce data early
- Document purpose — Use clear transformation names so others understand why each step exists
Troubleshooting
"Transformation produces empty result"
- Check that the source path/array path matches the actual response structure
- Verify filter conditions aren't too restrictive
- Use the live preview to identify which step removes the data
"Field names don't match after rename"
- Rename is case-sensitive — verify exact field names
- Rename applies to top-level fields only, not nested paths
"Transform chain order matters"
- A filter that runs before a flatten will operate on different data than one running after
- Reorder steps and use the preview to verify
Related Documentation
- Endpoint Configuration - Where transformations are configured
- Reusable Variables - Variables extract from transformed data
- Dependency Mapping - Mappings use transformed responses