This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Webhooks

You can use these API calls to obtain information on, create, or delete webhooks.

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.

1 - GET webhooks

Returns a list of active webhooks for this cluster.

Returns a list of active webhooks for this cluster.

Resource URL

https://<NODE>:5444/webhooks

The API key must have restricted level security or higher.

Parameters

None.

Example request

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"
}

2 - POST webhooks/subscribe

Creates a subscription for a webhook.

Creates a subscription for a webhook.

Resource URL

https://<NODE>:5444/webhooks/subscribe

The API key must have restricted level security or higher.

Parameters

url A URL to an application that accepts JSON messages from this cluster.

Example request

POST https://<NODE>:5444//webhooks/subscribe?url=http%3A%2F%2Fexample.com%2Fgetwebhook.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

3 - DELETE webhooks/:subscriber_id

Deletes the webhook identified by :subscriber_id.

Deletes the webhook identified by :subscriber_id. The :subscriber_id is the value of the id field that the GET webhooks command returns.

Resource URL

https://<NODE>:5444/webhooks/:subscriber_id

The API key must have restricted level security or higher.

Parameters

None.

Example request

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.