Create Filter
POST {{host}}/{{version}}/{{destination_name}}/filters/
Create a destination filter for a specific source and destination pair.
If you have multi-instance destinations configured to the specific source you must supply a destination configuration id in the request parameters. An example request, Create Filter - Multi Destination Enabled, can be found in the Example requests dropdown. To find the destinationConfigurationId navigate to the destination overview page of the destination which you are querying metrics for in the Segment app. You can retieve the destinationConfigurationId from the URL where it is configured as instances/$destinationConfigurationId/configuration
.
Request Body
{"filter"=>{"title"=>"Only allow track events", "if"=>"type != 'track'", "actions"=>[{"type"=>"drop_event"}], "enabled"=>true}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"name":"workspaces/developer-plan/sources/diggory-filters/destinations/google-analytics/filters/df_1JjE7f3gz8OXU6lVbUGuDhHcyKl","if":"type != 'track'","actions":[{"type":"drop_event","fields":{}}],"title":"Only allow track events","description":"","enabled":true}