This plugin creates support for webhooks for GLPI.
GLPI 9.5.* or GLPI 10.0.x
Installation is similar to those of other plugins: copy to plugins/
directory, ensure that name of the folder that
contains the plugin files is fpwebhook
, and then install and enable from Administration/Plugins section. This will
create the database tables.
Use Uninstall option in Administration/Plugins section.
Please keep in mind that this will remove the database tables, including all subscriptions and trigger history.
410 Gone
, the subscription will be deactivated.glpi_plugin_fpwebhook_eventtypes
- event type dictionaryglpi_plugin_fpwebhook_subscriptions
- subscriptions to hooks with names, URLs, and failure countglpi_plugin_fpwebhook_contents
- content to sent, created by eventsglpi_plugin_fpwebhook_messages
- actual attempts to send messages, including replies; this table is the main historyglpi_plugin_fpwebhook_queue
- the queue; this table is regularly cleaned and does not retain dataThis is an example based on the first implemented event,TicketCreated
.
TicketCreated
event is triggered410 Gone
status, the subscription is immediately disabledfailures
count for its subscription is increasedFiltering is an optional functionality that allows to set two parameters: a ticket category and a title-matching regular expression. If the category is chosen, only tickets belonging to this category will trigger the event - others will be ignored. If the filtering regex is non-empty, only the tickets with the title matching the expression will trigger the event.
The filters are applied together - if both filters are set, the event will trigger only if the ticket has both a matching title and a correct category.
To remove the filtering from the subscription, simply empty the regular expression field and unset the category field.
The regular expression should be entered without delimiters. Since the delimiters used are |
, this character is
disallowed in the regular expression.
Note: the regular expression is applied as case-sensitive.
On ticket creation, returns:
ticket_id
- ticket ID; integersubject
- ticket title/subject; string, plaintextcontent
- ticket description; string, HTMLOn ticket solution added, returns:
ticket_id
- ticket ID; integersolution_id
- solution ID; integercontent
- solution description; stringstatus
- ticket status; stringOn ticket follow-up added, returns:
ticket_id
- ticket ID; integerfollowup_id
- follow-up ID; integercontent
- follow-up content; stringOn ticket approval request (ticket validation) added, returns:
approval_id
- ticket validation ID; integerticket_id
- ticket ID; integeruser_id
- user ID; integercontent
- approval request content; stringOn ticket approval request (ticket validation) added, returns:
approval_id
- ticket validation ID; integerticket_id
- ticket ID; integeruser_id
- user ID; integercontent
- approval request reply content; stringstatus
- approved/refused status; string410 Gone
will result in an immediate deactivation of the subscriptionPluginFpwebhookEventBase
glpi_plugin_fpwebhook_eventtypes
tablesetup.php