Skip to main content

Transforms

Transforms reshape an action's data after it is fetched. Declare a post_transforms: block — an array of transform functions applied in order.

actions:
- name: AddAttribute
http:
url: https://jsonplaceholder.typicode.com/todos/10
post_transforms:
- extract_value: ".body"
- add_attribute:
env: production

The filter transform reuses the assertion vocabulary to keep only matching elements. Every transform and its fields are listed below.

Transform

FieldTypeDescription
rename_attributesMap<string, string> (nullable)Rename attributes (keys) within a JSON object. Maps old attribute names to new attribute names.
remove_attributesArray<string> (nullable)Remove specified attributes from the JSON object. Provides an array of attribute names to exclude.
keep_attributesArray<string> (nullable)Keep only specified attributes, removing all others. Provides an allowlist of attribute names.
move_attributesMap<string, string> (nullable)Move attributes from one location to another. Maps source path to destination path.
rename_keysMap<string, string> (nullable)Rename keys at the root level of a JSON object. Maps old key names to new key names.
remove_keysArray<string> (nullable)Remove specified keys from the JSON object. Provides an array of key names to exclude.
bcryptBcryptTransform (nullable)Hash a value using bcrypt for secure password storage. Supports custom cost factor.
add_attributeobject (nullable)Add new attributes to the JSON object with specified key-value pairs.
return_rownumber (nullable)Return a specific row from a result set by index (0-based).
extract_valuestring (nullable)Extract a single value from the response using a JSON path.
extract_arrayTransformExtractArray (nullable)Extract an array from a JSON response with options for flattening and deduplication.
extract_with_json_pathstring (nullable)Extract data using a JSON path expression. Shortcut for simple extractions.
extract_with_jqstring (nullable)Extract data using jq filter syntax for complex JSON transformations.
extract_with_regexExtractWithRegex (nullable)Extract values from a string using regex capture groups.
add_jwtAddJWT (nullable)Add a JWT token to the response with configurable expiration and payload.
read_jwtReadJWT (nullable)Read and decode a JWT token to extract its payload.
numericsArray<string> (nullable)Convert string fields to numeric types. Provides an array of field names to convert.
group_byArray<string> (nullable)Group array elements by specified fields. Used for aggregation operations.
generate_passwordTransformPasswordGen (nullable)Generate a secure random password with customizable options for length and character types.
replace_valuesTransformReplaceValues (nullable)Replace values in strings or arrays with support for regex and multiple replacements.
flattenTransformFlatten (nullable)Flatten nested objects into a single level with configurable key separators.
b64_decodestring (nullable)Decode a Base64-encoded string.
b64_decode_as_jsonstring (nullable)Decode a Base64-encoded string and parse as JSON.
b64_encodeTransformConfig (nullable)Encode a value to Base64. Can be a direct string or custom transform configuration.
yaml_to_jsonTransformConfig (nullable)Convert YAML-formatted string to JSON.
nested_transformsMap<string, Array<Transform>> (nullable)Apply nested transforms to specific keys. Maps keys to arrays of transform operations.
mathTransformMath (nullable)Perform mathematical operations on numeric values with expressions.
filterTransformFilterSearch (nullable)Filter array elements based on specified conditions.
generate_bytesGenerateBytes (nullable)Generate random bytes with specified length.
encrypt_valueEncryptValue (nullable)Encrypt a value using AES-256-GCM encryption.
s3_generate_presigned_urlS3GeneratePresignedURL (nullable)Generate a presigned URL for S3 file access.
encode_uriTransformConfig (nullable)URI-encode an entire URL string.
encode_uri_componentTransformConfig (nullable)URI-encode a single component of a URL.
decode_uriTransformConfig (nullable)URI-decode an encoded URL string.
decode_uri_componentTransformConfig (nullable)URI-decode a single component of an encoded URL.
generate_slugTransformConfig (nullable)Generate a URL-friendly slug from a string.

TransformConfig

One of:

CustomTransform

FieldTypeDescription
keystringRequired.
json_pathstringRequired.

TransformExtractArray

FieldTypeDescription
fromstring (nullable)The JSON path to the starting array
pathsArray<string> (nullable)Array of JSON paths to extract values from each element
flattenboolean (nullable)Whether to flatten nested arrays
dedupeboolean (nullable)Whether to remove duplicates

TransformFilterSearch

FieldTypeDescription
targetstring (nullable)
conditionsMap<string, Test>Required. Conditions to filter items in the array.

TransformFlatten

FieldTypeDescription
key_separatorstringRequired.
prefixstring (nullable)
targetstring (nullable)

TransformMath

FieldTypeDescription
targetstring (nullable)
expressionsMap<string, string>Required.
to_stringboolean (nullable)
decimal_placesnumber (nullable)
eval_typeMathEvalType (nullable)

TransformPasswordGen

FieldTypeDescription
keystringRequired.
lengthnumberRequired.
numbersboolean (nullable)
lowercase_lettersboolean (nullable)
uppercase_lettersboolean (nullable)
symbolsboolean (nullable)
spacesboolean (nullable)
exclude_similar_charactersboolean (nullable)
strictboolean (nullable)

TransformReplaceValues

FieldTypeDescription
target_valuestringRequired.
target_keystring (nullable)
find_strstring (nullable)
new_strstring (nullable)
regexstring (nullable)
valuesArray<string> (nullable)

BcryptTransform

FieldTypeDescription
keystring (nullable)
valuestring (nullable)
jqstring (nullable)
costnumber (nullable)

AddJWT

FieldTypeDescription
keystringRequired.
secretstringRequired.
expstring (nullable)
dataanyRequired.

ReadJWT

FieldTypeDescription
keystringRequired.
tokenstringRequired.

EncryptValue

FieldTypeDescription
keystringRequired.
datastringRequired.
secret_keystringRequired.
noncestringRequired.

GenerateBytes

FieldTypeDescription
keystringRequired.
lengthnumberRequired.

ExtractWithRegex

FieldTypeDescription
valuestringRequired.
exprstringRequired.
keysArray<string>Required.

S3GeneratePresignedURL

FieldTypeDescription
bucketstringRequired.
file_keystringRequired.
expiration_secsnumberRequired.
endpointstringRequired.
regionstringRequired.
access_key_idstringRequired.
secret_access_keystringRequired.
keystringRequired.
json_pathstring (nullable)

MathEvalType

Type: string — one of: int, float, string, bool

DataType

Type: string — one of: text, json, csv, xml