Paziņojumu apstrādātāji
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}' \
Parametri | Detaļas | Apraksts |
---|---|---|
page | Nepieciešams Vesels skaitlis | Lapas numurs, no kura vēlaties rezultātus. Noklusējuma iestatījums ir 1 . |
results_per_page | Nepieciešams Vesels skaitlis | Cik rezultātu vēlaties redzēt lapā. Atļautās vērtības ir: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Noklusējums ir 25 . |
{ "data": [ { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2025-10-16 11:02:12", } ], "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:02:12", } }
POST https://tistos.com/api/notification-handlers
Parametri | Detaļas | Apraksts |
---|---|---|
name | Nepieciešams Virkne | - |
type | Nepieciešams Virkne | Atļautās vērtības: email , webhook , slack , discord , telegram , microsoft_teams |
Nepieciešams Virkne | Pieejams, kad: type = email E-pasts | |
webhook | Nepieciešams Virkne | Pieejams, kad: type = webhook Webhook URL |
slack | Nepieciešams Virkne | Pieejams, kad: type = slack Slack webhook URL |
discord | Nepieciešams Virkne | Pieejams, kad: type = discord Discord webhook URL |
telegram | Nepieciešams Virkne | Pieejams, kad: type = telegram Telegram API marķieris |
telegram_chat_id | Nepieciešams Virkne | Pieejams, kad: type = telegram Telegram tērzēšanas ID |
microsoft_teams | Nepieciešams Virkne | Pieejams, kad: type = microsoft_teams Microsoft Teams webhook 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}
Parametri | Detaļas | Apraksts |
---|---|---|
name | Nepieciešams Virkne | - |
type | Nepieciešams Virkne | Atļautās vērtības: email , webhook , slack , discord , telegram , microsoft_teams |
Nepieciešams Virkne | Pieejams, kad: type = email E-pasts | |
webhook | Nepieciešams Virkne | Pieejams, kad: type = webhook Webhook URL |
slack | Nepieciešams Virkne | Pieejams, kad: type = slack Slack webhook URL |
discord | Nepieciešams Virkne | Pieejams, kad: type = discord Discord webhook URL |
telegram | Nepieciešams Virkne | Pieejams, kad: type = telegram Telegram API marķieris |
telegram_chat_id | Nepieciešams Virkne | Pieejams, kad: type = telegram Telegram tērzēšanas ID |
microsoft_teams | Nepieciešams Virkne | Pieejams, kad: type = microsoft_teams Microsoft Teams webhook URL |
is_enabled | Nepieciešams Loģisks | - |
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}' \