-
Notifications
You must be signed in to change notification settings - Fork 1
invoke_external_triggers
If you have questions or find issues please feel free to contact us here: InSTEDD Technology Users Community (Google Group)
This page describes how to invoke external triggers of an mBuilder application. An external trigger can be viewed as named procedures with parameters. An external trigger expose a HTTP POST endpoint that, when requested, executes the steps in the trigger. Parameters are received via querystring. Authentication need to be handled in some of the supported mechanisms.
Supported mechanisms are:
-
Basic auth. Specifying InSTEDD account user and password via HTTP Basic Access
-
Auth token. After you create an Auth token in your application settings page, you will be able to use that Bearer Access Token via HTTP header
Authorization: Bearer ACCESS_TOKEN
or query string...?access_token=ACCESS_TOKEN
-
OAuth 2.0. All InSTEDD tools use OAuth 2.0 via InSTEDD login service and can be consumed by alto_guisso and alto_guisso_rails.
Assumed there is an external trigger named alert with a parameter kind like depicted in the following image
It can be called using
- Basic Auth as
curl -u "user@domain.com":password -d "" http://mbuilder.instedd.org/external/application/20/trigger/alert?kind=low
- Auth token as
curl -H "Authorization: Bearer ACCESS_TOKEN" -d "" http://mbuilder.instedd.org/external/application/20/trigger/alert?kind=low
or
curl -d "" http://mbuilder.instedd.org/external/application/20/trigger/alert?kind=low&access_token=ACCESS_TOKEN
The -d ""
option forces a POST with an empty payload.
- OAuth 2.0 following the OAuth 2.0 protocol with InSTEDD login.