This type of distribution sends incoming data to an HTTP server.
Note that as live data can be very fast, we suggest the webhook server must be able to handle a high rate of incoming calls.
The type name to use in your configuration is webhook.
The following configuration options are accepted…
| Name | Notes | Purpose |
|---|---|---|
| hostname | Required | The DNS name or IP of your HTTP server |
| port | Default 80/443 | The port number used to communicate to the HTTP server |
| resource | The resource name to push data to (added after the hostname and port) | |
| headers | Name/value pairs to be set as part of the request header | |
| method | POST | The method of transmission |
The final URL is built out of hostname, port and prefix. For example…
{ "config": { "hostname": "https://myserver.com", "resource": "/api/submit" } }
…will submit requests to https://myserver.com/api/submit.
All of the following methods will include examples where we are sending the value 'Main Oven.Temperature' to '192.0'.
The following methods are available…
The request is made as a standard GET web request.
https://myserver.com/api/submit?Main Oven.Temperature=192.0
The request is made as a standard POST web request, with the content encoded as form data.
https://myserver.com/api/submit BODY: ...encoded form data...
The request is made as a POST web request, with the content sent as a JSON-encoded object in the body..
https://myserver.com/api/submit
BODY: { "Main Oven.Temperature": 192.0 }
The request is made as a single. consolidated POST web request, with the content sent as a form…
https://myserver.com/api/submit BODY: ...encoded form data with multiple values...
The request is made as a single. consolidated POST web request, with the content sent as a JSON encoded body…
https://myserver.com/api/submit
BODY: { "Main Oven.Temperature": 192.0,"Main Oven.Target": 195.0 }