Webhook Event Filters
Intro
When creating a webhook subscription, you may want to be notified only if the event matches certain scenarios. With Webhook filters, you can set specific event filters so that your application only receives events for specific Fieldwire actions or specific Fieldwire Projects
Project Filters
Project filters allow you to filter events for specific project IDs. These are ideal for when you're interested in receiving notifications only for specific project IDs.
Note: Fieldwire project ids use the GUID format eg:7E9081B5-9A6D-4CC1-A8C3-47F69FB4198D
Warning Passed in GUIDs are not validated to match with existing Fieldwire Projects. So it is possible to define a filter that will not allow any events through. Validate your IDs before creating the filter.
Example
Below is a example POST body for a subscription that will trigger on events in Projects with the ids [D1A5279D-B27D-4CD4-A05E-EFDD53D08E8D, 594ABD08-C02C-4827-8ABF-A128006848A3]
{
"subscription_name": "My projects",
"description": "Filter definition for filtering on my projects",
"post_url": "https://YourEndpoint.com/",
"subscription_status": "enabled",
"entity_filters": [],
"project_filters": ["D1A5279D-B27D-4CD4-A05E-EFDD53D08E8D", "594ABD08-C02C-4827-8ABF-A128006848A3"]
}
Note: project_filters can also be updated in a PATCH call. Each PATCH operation will completely replace any previous values
Entity Filters
Entity filters allow you to filter events based on specific actions taking place in Fieldwire. These are are ideal for when your application only needs to listen for specific actions on Fieldwire entities (eg: tasks being created, or forms being updated).
Format
Entity filters are defined using the 'dot' format. First is the Entity that the filter applies too, with the actions to filter on. Note that filter definitions are not case sensitive.
i.e. Sheet.Created
Supported Entities & Actions
See Webhook event types for complete list of entities that are supported and the supported actions for each entity.
Wildcard Action value: special action type that allows for a filter to allow all actions for a given entity type.
eg Sheet.*
will allow events that are related to a sheet to go through.
Example
Below is a example POST body for a subscription that will trigger on any sheet events and Task creation events.
{
"subscription_name": "Tasks and Sheets",
"description": "Filter defintion for filtering on all Sheet events and Task creation events",
"post_url": "https://YourEndpoint.com/",
"subscription_status": "enabled",
"entity_filters": ["Sheet.*", "Task.Created"],
"project_filters": []
}
Note: If entity_filters is left blank, all events will trigger the webhook subscription
Updated about 1 month ago