What are Webhooks?
Webhooks are automated HTTP messages, usually sent to a defined destination with a payload of data, that are triggered by an event from a system.
They can be used to integrate with 3rd party APIs or systems to trigger scripts or subsequent API calls, depending on the contents of the received payload.
Technical details of OpenField Webhooks can be found in our Connect API documentation.
What OpenField Webhooks are available?
OpenField can be configured to notify external systems via a webhook when data is created or updated, currently limited to Activities.
Summary Stats Webhook
OpenField 'Summary Stats' Webhooks can be created to send a webhook event and payload when an activity has it's summary (or 'aggregated') data updated, as a result of:
- The activity being reprocessed in the cloud:
- After it is edited in the Cloud Editor
- Being manually selected to reprocess, such as to apply new athlete or team settings
- Vector device 'raw files' and sensor data being uploaded to and processed in the cloud, via the Vector dock
- When data is injected into an activity via Data Injection
- When an activity has been created or reprocessed in Console, and Console syncs to cloud
This webhook is useful if you wish to automate API queries against summary/aggregate data (such as the /stats API endpoint) whenever aggregated data has been created or changed for an activity,
Activity Created/Updated/Deleted Webhooks
OpenField 'Activity' Webhooks can be created to send a webhook event and payload when an activity is:
- Created
- Updated*
- Deleted
*Updated activity webhooks are triggered when activities are updated including:
- Periods
- Tags (period tags)
- Summary and Sensor data
How to configure Webhooks in OpenField Cloud
Webhooks can be configured via the Connect API or via the Settings page in OpenField Cloud.
Details on webhook configuration in the Connect API can be found in our Connect API documentation.
All OpenField accounts can configure Summary Stats webhooks - these webhooks use the 'Summary Stats' topic and the 'Updated' Action.
To configure 'Activity' topic webhooks in OpenField Cloud, your account must have the Webhooks module and access to the Connect API. Please contact Support to ensure these options are enabled for your account.
Viewing Webhooks
- Login to OpenField Cloud
- Navigate to Settings > Webhooks
- The Webhooks settings screen will display a list of existing Webhooks, as well as the fields to add a new webhook
Creating a new webhook
- From the webhooks settings page, enter the webhook name, topic (Summary Stats orActivity), action (Created, Updated, Deleted), Callback URL, Secret (Optional)
- A secret can be configured against each webhook that can be used by the external system to confirm the authenticity of the call. A signature is included in the request header containing a string generated by encrypting the payload (HMAC SHA256) with this secret.
- A secret can be configured against each webhook that can be used by the external system to confirm the authenticity of the call. A signature is included in the request header containing a string generated by encrypting the payload (HMAC SHA256) with this secret.
- Once all details are entered select Add
- When the webhook is added a simulated/test event will be triggered as a test
Viewing webhook events triggered, updating or deleting an existing webhook
- From the webhooks setting screen select View on the desired webhook
- The webhook can be deleted, or updated via the Edit Webhook Configuration fields. Once the fields have been updated click Update and Run
- The last 50 events triggered by this webhook are listed under Webhook events. Each webhook event can be manually re-ran by clicking Re-run, or the playload of each event can be viewed by clicking View
Related articles