Declaration
You may create a webhook entry point for a Sift installation. In the following example you can see the definition of two webhooks for a Sift with the input labels one
and two
:
"webhooks": {
"one": {
"inbound": {
"uri": "{key}/{value}"
}
},
"two": {
"inbound": {
"uri": "{param}",
"jsonPath": "{\"key\": \"last\", \"value\": {\"param\": \"$.uri.param\", \"form\": $.fields }}",
"response": {
"payload": {
"base64": "cG93ZXJlZCB3aXRoIOKdpCBieSBSZWRzaWZ0",
"mimeType": "text/plain"
}
}
}
}
}
one
is a simple webhook that expects the parameters at the end of the request URItwo
customises the webhook response on a 200 OK to a text stringtwo
also extracts data from an HTTP POST so this webhook could be used to accept data from a web form.
The output of all webhooks are ultimately parsed as a JSON document conforming to the bucketed data JSON schema. The various supported pipelines provide multiple routes to assemble this JSON document. For reference, a complete set of keys for this document can be seen in the example column.
In this document, only key
and value
are required. Value is canonically a byte array but primitive types or a nested JSON structure will be converted to a String form and encoded as UTF-8 as required.
Updated less than a minute ago