System event propagation

31 views
Skip to first unread message

Niels Lippke

unread,
Jan 24, 2023, 10:50:52 AM1/24/23
to Fusio
Hi, 

I want to subscribe to system events to get informed when e.g. routes are created.
There's a setting called 'system_dispatcher' which I've linked to an HTTP Connection. But there are no system events ever propagated.
I've also added the system cron (as mentioned in the docs).

Is it supposed to work? And if yes, what's the proper way to set it up?

Thanks, 

Niels

Christoph Kappestein

unread,
Jan 26, 2023, 2:49:46 PM1/26/23
to Fusio
Hi Nils,

so basically you only need to subscribe to the "fusio.route.create" event and then your endpoint receives a HTTP request every time a route was created.

You can do this either manually by sending a POST request to the "/backend/event/subscription" endpoint s.
https://demo.fusio-project.org/apps/documentation/#!/api/backend/event/subscription

or you can also create the subscription through the backend UI. By default you dont see all Fusio internal routes, events etc. but you can create a new role for the backend category, which then gives you access to all internal events. Then you can also subscribe to every internal event s.

subscribe.png

Then you need to create a cron to trigger the "php bin/fusio cronjob" which in the end executes all webhooks.

best regards
Christoph

Niels Lippke

unread,
Jan 31, 2023, 5:53:41 AM1/31/23
to Fusio
Thank's a lot, Christoph. The part with the role was the missing piece. Now it works. Two thumbs up!!!
Reply all
Reply to author
Forward
0 new messages