Version 4.6.0¶
This release comes with Webhooks, first requested back in March 2023. Thanks for waiting!
Webhooks are triggered when an event happens on the server.
These events can be configure by the site's Admin:
- User created
- User deleted
- Form created
- Form published
- Form deleted
And form Editors can configure these events on a form to form basis:
- Answer created
- Answer edited
- Answer deleted
- Form edited
- Form published
- Form deleted
This release also includes various CSS tweaks and bug fixes.
Notably, the data-display component now correctly displays the is_public status of a form (a bug introduced with v4.1.2).
Enjoy!
The webhook¶
Each webhook is defined by:
- A
Scope(User, Form, Answer) - An
Event(created, edited, published, etc). - An
Endpointto POST the notification - A
Secretused (combined with a timestamp) to create aHMAChash to authenticate the notification
The webhook configuration page includes a test function, and Header and JSON body examples.
Example consumer¶
We built an example webhook consumer with Fast-API to help us develop and test.
Have a read if you want to get an idea on how to consume webhooks provided by LiberaForms.
Upgrade from v4.*.*¶
Stop LiberaForms
sudo supervisorctl stop liberaforms
sudo supervisorctl stop liberaforms-logs
Fetch version 4.6.0
git fetch origin tag v4.6.0 --no-tags
git checkout v4.6.0 -b v4.6.0
cat VERSION.txt
Upgrade python packages (not required if upgrading from v4.5.0)
source ./venv/bin/activate
pip install --upgrade pip
pip install -r ./requirements.txt
Upgrade the database schema to af7549c85f10
flask db upgrade
See the installed versions
flask site get-versions
Restart the supervisor processes.
sudo supervisorctl start liberaforms-logs
sudo supervisorctl start liberaforms