Обробники сповіщень
GET https://tistos.com/api/notification-handlers/
curl --request GET \
--url 'https://tistos.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://tistos.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Параметри | Деталі | Опис |
---|---|---|
page | Необов'язковий Ціле число | Номер сторінки, з якої ви хочете отримати результати. За замовчуванням 1 . |
results_per_page | Необов'язковий Ціле число | Скільки результатів ви хочете на сторінці. Дозволені значення: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . За замовчуванням 25 . |
{ "data": [ { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2025-10-16 11:15:27", } ], "meta": { "page": 1, "results_per_page": 25, "total": 1, "total_pages": 1 }, "links": { "first": "https://tistos.com/api/notification-handlers?page=1", "last": "https://tistos.com/api/notification-handlers?page=1", "next": null, "prev": null, "self": "https://tistos.com/api/notification-handlers?page=1" } }
GET https://tistos.com/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://tistos.com/api/notification-handlers/{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": "2025-10-16 11:15:27", } }
POST https://tistos.com/api/notification-handlers
Параметри | Деталі | Опис |
---|---|---|
name | Обов'язково Рядок | - |
type | Обов'язково Рядок | Дозволені значення: email , webhook , slack , discord , telegram , microsoft_teams |
Необов'язковий Рядок | Доступно, коли: type = email Електронна пошта | |
webhook | Необов'язковий Рядок | Доступно, коли: type = webhook URL webhook |
slack | Необов'язковий Рядок | Доступно, коли: type = slack Slack webhook URL |
discord | Необов'язковий Рядок | Доступно, коли: type = discord Discord webhook URL |
telegram | Необов'язковий Рядок | Доступно, коли: type = telegram Токен API Telegram |
telegram_chat_id | Необов'язковий Рядок | Доступно, коли: type = telegram Ідентифікатор чату Telegram |
microsoft_teams | Необов'язковий Рядок | Доступно, коли: type = microsoft_teams URL вебхука Microsoft Teams |
curl --request POST \
--url 'https://tistos.com/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://tistos.com/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://tistos.com/api/notification-handlers/{notification_handler_id}
Параметри | Деталі | Опис |
---|---|---|
name | Необов'язковий Рядок | - |
type | Необов'язковий Рядок | Дозволені значення: email , webhook , slack , discord , telegram , microsoft_teams |
Необов'язковий Рядок | Доступно, коли: type = email Електронна пошта | |
webhook | Необов'язковий Рядок | Доступно, коли: type = webhook URL webhook |
slack | Необов'язковий Рядок | Доступно, коли: type = slack Slack webhook URL |
discord | Необов'язковий Рядок | Доступно, коли: type = discord Discord webhook URL |
telegram | Необов'язковий Рядок | Доступно, коли: type = telegram Токен API Telegram |
telegram_chat_id | Необов'язковий Рядок | Доступно, коли: type = telegram Ідентифікатор чату Telegram |
microsoft_teams | Необов'язковий Рядок | Доступно, коли: type = microsoft_teams URL вебхука Microsoft Teams |
is_enabled | Необов'язковий Булевий | - |
curl --request POST \
--url 'https://tistos.com/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://tistos.com/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://tistos.com/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \