You can use these API calls to obtain information on, create, or delete webhooks.
GET webhooks | Returns a list of active webhooks. |
POST webhooks/subscribe | Creates a new webhook. |
DELETE webhooks/:subscriber_id | Deletes an existing webhook. |
This is the multi-page printable view of this section. Click here to print.
You can use these API calls to obtain information on, create, or delete webhooks.
GET webhooks | Returns a list of active webhooks. |
POST webhooks/subscribe | Creates a new webhook. |
DELETE webhooks/:subscriber_id | Deletes an existing webhook. |
Returns a list of active webhooks for this cluster.
https://<NODE>:5444/webhooks
The API key must have restricted level security or higher.
None.
GET |
https://<NODE>:5444/webhooks |
Response:
{
"body": [
{
"host": "192.168.232.1",
"id": "79c1c8a18be02804b3d2f48ea6462909",
"port": 80,
"timestamp": "2014-07-20 22:54:09.829642",
"url": "/gettest.htm"
},
{
"host": "192.168.232.1",
"id": "9c32cb0f3d2f9a7cb10835f1732fd4a7",
"port": 80,
"timestamp": "2014-07-20 22:54:09.829707",
"url": "/getwebhook.php"
}
],
"href": "/webhooks",
"links": [
"/subscribe",
"/:subscriber_id"
],
"mime-type": "application/vertica.webhooks.json-v2"
}
Creates a subscription for a webhook.
https://<NODE>:5444/webhooks/subscribe
The API key must have restricted level security or higher.
url |
A URL to an application that accepts JSON messages from this cluster. |
POST |
https://<NODE>:5444//webhooks/subscribe?url=http%3A%2F%2F example.com %2F getwebhook.php |
Response:
The response is not JSON encoded. The only text response is the ID of the webhook subscription. Additionally, an HTTP 200/OK header indicates success.
79c1c8a18be02804b3d2f48ea6462909
Deletes the webhook identified by :subscriber_id
. The :subscriber_id
is the value of the id field that the GET webhooks command returns.
https://<NODE>:5444/webhooks/:subscriber_id
The API key must have restricted level security or higher.
None.
DELETE |
https://<NODE>:5444/webhooks/79c1c8a18be02804b3d2f48ea6462909 |
Response:
There is no HTTP body response for successful deletes. A successful delete returns an HTTP 200/OK header.