Webhook Resource
Description
This resource is for manipulating individual webhooks.
GET /webhooks/:ID
Get the details of a webhook.
GET Parameters
| Name | Required | Type | Description | Default Value |
|---|---|---|---|---|
| :ID | Yes | URL | Numeric ID of the webhook |
GET Response Values
| Name | Type | Description |
|---|---|---|
| resource | String | |
| job_resource | String | Pending messages created by this webhook |
| clear_job_resource | String | Clear pending messages |
| download_job_resource | String | Download pending messages |
| test_resource | String | POST to Trigger a test for this webhook |
| url | String | Destination URL for this webhook |
| name | String | |
| enabled | Boolean | |
| verify_ssl | Boolean | Require valid SSL certificate for HTTPS URLs |
| header | List[Header] | Headers included with each request |
| secret | String | Key for x-rweb-sig header |
| timeout | Integer | Hours to retain failed messages |
| events | List[String] | Events that will trigger webhook messages |
Example GET Request
GET /webhooks/9
{
"resource": "/webhooks/9",
"job_resource": "/webhooks/9/webhook_jobs",
"clear_job_resource": "/webhooks/9/webhook_jobs/clear",
"download_job_resource": "/webhooks/9/webhook_jobs/download",
"test_resource": "/webhooks/9/test",
"url": "https://example.com",
"name": "Example Webhook",
"enabled": false,
"verify_ssl": true,
"header": [],
"secret": "",
"timeout": 0,
"events": [
"zone"
]
}
PUT /webhooks/:ID
Update webhook configuration with new values. This will replace any part of the webhook that is specifed. See webhook creation for the full set of parameters.
Example PUT Request
PUT /webhooks/9
{
"data": {
"name": "Another Example",
"enabled": false,
"verify_ssl": true,
"header": [],
"secret": "",
"timeout": 0,
"events": [
"group"
]
}
}
Example PUT Response
HTTP/1.1 200 OK
DELETE /webhooks/:ID
Delete a webhook configuration.
DELETE Parameters
| Name | Required | Type | Description | Default Value |
|---|---|---|---|---|
| :ID | Yes | URL | Numeric ID of the webhook |
Example Request
DELETE /webhooks/9
Example Response
HTTP/1.1 200 OK