General plugins (Local): WebHooks

local_webhooks
Maintained by Picture of Valentin Popov Valentin Popov
Adding WebHook features to the Moodle system.
23 sites
60 downloads
5 fans

Moodle WebHook’s

GitHub Release Build Status Codacy Badge


The Webhooks feature allows applications to receive real-time notification of changes to certain data.

Using Webhooks, your application will be able to receive notifications of changes to selected topics and their fields. Because of this, you do not have to rely on continuous or even periodic requests to check for updates. Notifications about Webhooks updates are sent as POST requests to the callback URL you specified. Notifications can indicate the very fact of a field change or include a new value.

Features:

  • Use any number of services for notification;
  • Customizing each external service;
  • Interception of all events in the Moodle system;
  • Use a secret phrase to authenticate requests;
  • JSON - Format of outgoing data;

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2

Contributors

Picture of Valentin Popov
Valentin Popov (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Plugins bot
    Wed, 25 Oct 2017, 2:10 PM
    Approval issue created: CONTRIB-7096
  • Picture of Sebastian Castellanos
    Wed, 20 Jun 2018, 5:50 AM
    Hi! Thanks for the plugin, we were looking something like this for log time smile
    Do you have some example of how to deal with the parameters of the events when make the post call ?
    I want to know what are the parameters send i by the differents events

    Best Regards.
  • Picture of Valentin Popov
    Thu, 21 Jun 2018, 4:11 PM
    Hi, Sebastian!

    Thanks for the feedback, it's very valuable to me.
    The data is sent in JSON format. An example can be found here:
    `https://github.com/valentineus/moodle-webhooks/blob/master/docs/getting-started.md#request-format`

    A full list of properties with a description can be found here:
    `https://docs.moodle.org/dev/Event_2#Properties`

    The plugin does not affect the available values and fields, only adds additional ones for identification. It:
    * `host` - Hostname;
    * `token` - Secret key to verify the request;
    * `extra` - Additional field in which you are free to add something of their own;
  • Picture of Sebastian Castellanos
    Mon, 25 Jun 2018, 8:50 PM
    Great, working perfect!
    One more thing, all this events are not asynchronous right, moodle will always wait for a response of the hook ?

    Thanks!
  • Picture of Valentin Popov
    Tue, 26 Jun 2018, 1:48 PM
    Yes, the events are not asynchronous.
    I do not have a situation arises where it was a problem.

    I have an idea how to make them asynchronous.
    Tell me, is there a need for this?
  • Picture of Sebastian Castellanos
    Fri, 29 Jun 2018, 7:40 PM
    I created an async service in my backend, so now moodle can continue after events are fired.
    Thanks!
Please login to post comments