Preview Filter

POST {{host}}/{{version}}/filters/preview

This endpoint allows you to preview a Destination Filter against an arbitrary JSON payload without touching your production data. This is useful for testing.

Request Body

FieldTypeDescription
filterfilterThe filter that you wish to test. The only required fields are if and actions.required
inputstringA serialized JSON payload that you want to apply the filter to.required

Response Body

FieldTypeDescription
inputstringThe original input JSON payload, pre-filter.
outputstringThe filtered JSON payload.
diffstringA textual diff of the input and output JSON payload.

Request Body

{"filter"=>{"if"=>"all", "actions"=>[{"type"=>"blacklist_fields", "fields"=>{"properties"=>{"fields"=>["name", "age"]}}}], "enabled"=>true}, "input"=>"{ \"userId\": \"6592\", \"properties\": { \"name\": \"Bob Smith\", \"age\": \"40\", \"order\": \"129\" } }"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"input":"{ \"userId\": \"6592\", \"properties\": { \"name\": \"Bob Smith\", \"age\": \"40\", \"order\": \"129\" } }","output":"{\"properties\":{ \"order\": \"129\" },\"userId\":\"6592\"}","diff":" {\n \t\"properties\": {\n-\t\t\"age\": \"40\",\n-\t\t\"name\": \"Bob Smith\",\n \t\t\"order\": \"129\"\n \t},\n \t\"userId\": \"6592\"\n }"}