Web Request¶
Configure an outgoing web request to send messages or to trigger workflows in your external apps. Start by defining rules for the components in a journey, then, when a rule condition is true, a web request will be sent.
Observability uses HTTP and HTTPS to send a web request to your external apps with a JSON payload and static header fields that can contain information you define.
Tip
Observability supports web requests—such as webhooks, or other API calls—as a rule action.
Create an outgoing web request¶
-
Create a rule. Select Web Request as the action.
See Define Rules for more detailed steps.
-
Select the HTTP request method.
-
In the URL field, enter the URL of the endpoint.
Include either
https://orhttp://with the endpoint. -
Optional. Add JSON to the Payload field.
See JSON payload structure below for an example.
-
Optional. Add an array of objects to the Headers field.
See Headers structure below for an example.
-
When done, click Save.
JSON payload structure¶
An example structure for the JSON payload is:
Available data points¶
The JSON data points available to use in an Observability web request can be found in the table JSON Data Points.
Headers structure¶
An example structure for the request header argument is:
[
{
"key": "HeaderName1",
"value": "HeaderValue1"
},
{
"key": "HeaderName2",
"value": "HeaderValue2"
}
]
Technical considerations¶
- The URL allows HTTP and HTTPS.
- The HTTP method can be used to make a POST request to any API.
- The payload argument must be valid JSON and is only restricted by the database field size.
- While the JSON structure remains the same, the key-value pairs depend on the tool being called. For example, Slack
expects
{ "text": "..." }while Jira expects{ "data": { key-value data } }. - The payload is not required by the Observability system. If the URL endpoint does not require additional context or information, the rule can be created without.
-
As long as you have a valid URL for the webhook endpoint, Observability can send a message to any app or service that can receive an incoming webhook.
Example
For example, use webhooks to send a message to Slack or Teams, or trigger a Jira automation.