Teavituste töötlejad
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}' \
Parameetrid | Üksikasjad | Kirjeldus |
---|---|---|
page | Valikuline Täisarv | Lehekülje number, millelt soovite tulemusi. Vaikimisi 1 . |
results_per_page | Valikuline Täisarv | Kui palju tulemusi soovite lehe kohta. Lubatud väärtused on: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Vaikimisi on 25 . |
{ "data": [ { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2025-10-16 10:59:03", } ], "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 10:59:03", } }
POST https://tistos.com/api/notification-handlers
Parameetrid | Üksikasjad | Kirjeldus |
---|---|---|
name | Nõutav String | - |
type | Nõutav String | Lubatud väärtused: email , webhook , slack , discord , telegram , microsoft_teams |
Valikuline String | Saadaval, kui: type = email E-post | |
webhook | Valikuline String | Saadaval, kui: type = webhook Webhooki URL |
slack | Valikuline String | Saadaval, kui: type = slack Slack webhooki URL |
discord | Valikuline String | Saadaval, kui: type = discord Discord webhooki URL |
telegram | Valikuline String | Saadaval, kui: type = telegram Telegram API märk |
telegram_chat_id | Valikuline String | Saadaval, kui: type = telegram Telegrami vestluse ID |
microsoft_teams | Valikuline String | Saadaval, kui: type = microsoft_teams Microsoft Teams webhooki URL |
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}
Parameetrid | Üksikasjad | Kirjeldus |
---|---|---|
name | Valikuline String | - |
type | Valikuline String | Lubatud väärtused: email , webhook , slack , discord , telegram , microsoft_teams |
Valikuline String | Saadaval, kui: type = email E-post | |
webhook | Valikuline String | Saadaval, kui: type = webhook Webhooki URL |
slack | Valikuline String | Saadaval, kui: type = slack Slack webhooki URL |
discord | Valikuline String | Saadaval, kui: type = discord Discord webhooki URL |
telegram | Valikuline String | Saadaval, kui: type = telegram Telegram API märk |
telegram_chat_id | Valikuline String | Saadaval, kui: type = telegram Telegrami vestluse ID |
microsoft_teams | Valikuline String | Saadaval, kui: type = microsoft_teams Microsoft Teams webhooki URL |
is_enabled | Valikuline Boolean | - |
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}' \