From: Mike Rylander Date: Tue, 28 Jul 2020 19:55:47 +0000 (-0400) Subject: LP#1860703: Adding release notes for A/T HTTP reactor X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e8c6bb1316663b474aa2025da2f8229e8e7aff96;p=working%2FEvergreen.git LP#1860703: Adding release notes for A/T HTTP reactor Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- diff --git a/docs/RELEASE_NOTES_NEXT/Architecture/action-trigger-http-reactor.adoc b/docs/RELEASE_NOTES_NEXT/Architecture/action-trigger-http-reactor.adoc new file mode 100644 index 0000000000..de91c958cd --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Architecture/action-trigger-http-reactor.adoc @@ -0,0 +1,65 @@ +New Action/Trigger reactor for 3rd party signaling +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +This new Action/Trigger reactor module allows an Evergreen administrator to +create event defintions that use HTTP (or HTTPS) to contact external services +and let them know that something has happened in Evergreen. + +For instance, a discovery layer can be informed when a bib record is updated +or when a user's barcode changes. + +Reactor Template Syntax ++++++++++++++++++++++++ +The new reactor module uses a template to define its behavior. While the +template is processed by Template Toolkit, as with any A/T templates, its +output format is new to Evergreen. + +The template should output data that can be parsed by the Config::General Perl +module. See: https://metacpan.org/pod/Config::General + +Top level settings should include the HTTP *method* and the *url*. + +A block called *Headers* can be used to supply arbitrary HTTP headers. + +A block called *Parameters* can be used to append CGI parameters to the URL, +most useful for GET form submission. Repeated parameters are allowed. If +this block is used, the URL should /not/ contain any parameters, use one or +the other. + +A HEREDOC called *content* can be used with POST or PUT to send an arbitrary block +of content to the remote server. + +If the requested URL requires Basic or Digest authentication, the template can +include top level configuration parameters to supply a *user*, *password*, *realm*, +and hostname:port *location*. + +A default user agent string of "EvergreenReactor/1.0" is used when sending requests. +This can be overridden using the top level *agent* setting. + +Here is an example template that could be used by a definition attached to the +*bib.edit* hook: + +[source] +---- +method post # Valid values are post, get, put, delete, head +url https://example.com/api/incoming-update +agent MySpecialAgent/0.1 + +user updater +password uPd4t3StufF +realm "Secret area" +location example.com:443 + + + Accept-Language en + + + + type bib + id [% target.id %] + + +content <