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
Field | Type | Description | |
---|---|---|---|
filter | filter | The filter that you wish to test. The only required fields are ifand actions. | required |
input | string | A serialized JSON payload that you want to apply the filter to. | required |
Response Body
Field | Type | Description |
---|---|---|
input | string | The original input JSON payload, pre-filter. |
output | string | The filtered JSON payload. |
diff | string | A 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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
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 }"}