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.
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.
OpenField Webhooks can be created to send a notification and payload when an activity is:
- Created
- Updated*
- Deleted
Technical details of OpenField Webhooks can be found in our Connect API documentation.
*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.
To configure 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 (Activity), 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 payload of each event can be viewed by clicking 'View'