Notification handlers
GET https://www.wsmonitor.net/api/notification-handler/
curl --request GET \
--url 'https://www.wsmonitor.net/api/notification-handler/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://www.wsmonitor.net/api/notification-handler/' \
--header 'Authorization: Bearer {api_key}' \
Parameters | Details | Description |
---|---|---|
page | Optional Integer | The page number that you want results from. Defaults to 1 . |
results_per_page | Optional Integer | How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250 , 500 . Defaults to 25 . |
{ "data": [ { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2021-06-27 22:16:23" } ], "meta": { "page": 1, "results_per_page": 25, "total": 1, "total_pages": 1 }, "links": { "first": "https://www.wsmonitor.net/api/notification-handler?&page=1", "last": "https://www.wsmonitor.net/api/notification-handler?&page=1", "next": null, "prev": null, "self": "https://www.wsmonitor.net/api/notification-handler?&page=1" } }
GET https://www.wsmonitor.net/api/notification-handler/{notification_handler_id}
curl --request GET \
--url 'https://www.wsmonitor.net/api/notification-handler/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://www.wsmonitor.net/api/notification-handler/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
{ "data": { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2021-06-27 22:16:23" } }
POST https://www.wsmonitor.net/api/notification-handlers
Parameters | Details | Description |
---|---|---|
name | Required String | - |
type | Required String | Allowed values: email , webhook , slack , discord , telegram |
Optional String | (type=email) Email | |
webhook | Optional String | (type=webhook) Webhook URL |
slack | Optional String | (type=slack) Slack webhook URL |
discord | Optional String | (type=discord) Discord webhook URL |
telegram | Optional String | (type=telegram) Telegram API Token |
telegram_chat_id | Optional String | (type=telegram) Telegram Chat ID |
curl --request POST \
--url 'https://www.wsmonitor.net/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=[email protected]' \
--url 'https://www.wsmonitor.net/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=[email protected]' \
{ "data": { "id": 1 } }
POST https://www.wsmonitor.net/api/notification-handlers/{notification_handler_id}
Parameters | Details | Description |
---|---|---|
name | Optional String | - |
type | Optional String | Allowed values: email , webhook , slack , discord , telegram |
Optional String | (type=email) Email | |
webhook | Optional String | (type=webhook) Webhook URL |
slack | Optional String | (type=slack) Slack webhook URL |
discord | Optional String | (type=discord) Discord webhook URL |
telegram | Optional String | (type=telegram) Telegram API Token |
telegram_chat_id | Optional String | (type=telegram) Telegram Chat ID |
is_enabled | Optional Boolean | - |
curl --request POST \
--url 'https://www.wsmonitor.net/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example new name' \
--form 'is_enabled=1' \
--url 'https://www.wsmonitor.net/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example new name' \
--form 'is_enabled=1' \
{ "data": { "id": 1 } }
DELETE https://www.wsmonitor.net/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://www.wsmonitor.net/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://www.wsmonitor.net/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \