Configure a Web Action
A web action is used to send HTTP requests. The template of the request, along with the parameters to fill it, must be stored in a web action configuration. To create a new configuration, simply click on “Add Configuration” as shown in the picture below.
A web action configuration is made of:
- Name: the name of the configuration.
- Description: a brief description of the configuration.
- Request Template: the template of the HTTP request can be parametrized using the syntax of {{parameterName}}. For instance, see the example in the image below, where an HTTP request to send a Slack message has been configured. The body is parametrized to dynamically contain the user, the resource name, and the message content.
- Template Params: the template params are the parameters used inside the Request Template:
- Name: the name must match with the name used inside the double brackets.
- Default Value: the property to automatically fill the parameter. The property value is taken from a JSON object that has a structure like this one:
For example, to select the user’s username, you should enter{ "user": { "username":"", "fullName":", "displayName":", "email":" }, "resource": { "uuid":"", "name":"", ... //Resource properties can vary based on the resource type } }
user.username
in the default value field. - Mode: If set to MANUAL, the user can modify the value each time before sending the request. If set to AUTOMATIC, the user can not edit the value, so a default value strategy must be defined.
- Mandatory: the parameters must be valued in order to send the HTTP request.