Varslingshåndterere
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}' \
Parametere | Detaljer | Beskrivelse |
---|---|---|
page | Valgfritt Heltall | Sidenummeret du ønsker resultater fra. Standardverdi er 1 . |
results_per_page | Valgfritt Heltall | Hvor mange resultater ønsker du per side. Tillatte verdier er: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Standardverdi er 25 . |
{ "data": [ { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2025-10-16 11:20:07", } ], "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:20:07", } }
POST https://tistos.com/api/notification-handlers
Parametere | Detaljer | Beskrivelse |
---|---|---|
name | Påkrevd Streng | - |
type | Påkrevd Streng | Tillatte verdier: email , webhook , slack , discord , telegram , microsoft_teams |
Valgfritt Streng | Tilgjengelig når: type = email E-post | |
webhook | Valgfritt Streng | Tilgjengelig når: type = webhook Webhook-URL |
slack | Valgfritt Streng | Tilgjengelig når: type = slack Slack webhook-URL |
discord | Valgfritt Streng | Tilgjengelig når: type = discord Discord webhook-URL |
telegram | Valgfritt Streng | Tilgjengelig når: type = telegram Telegram API-token |
telegram_chat_id | Valgfritt Streng | Tilgjengelig når: type = telegram Telegram chat-ID |
microsoft_teams | Valgfritt Streng | Tilgjengelig når: 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}
Parametere | Detaljer | Beskrivelse |
---|---|---|
name | Valgfritt Streng | - |
type | Valgfritt Streng | Tillatte verdier: email , webhook , slack , discord , telegram , microsoft_teams |
Valgfritt Streng | Tilgjengelig når: type = email E-post | |
webhook | Valgfritt Streng | Tilgjengelig når: type = webhook Webhook-URL |
slack | Valgfritt Streng | Tilgjengelig når: type = slack Slack webhook-URL |
discord | Valgfritt Streng | Tilgjengelig når: type = discord Discord webhook-URL |
telegram | Valgfritt Streng | Tilgjengelig når: type = telegram Telegram API-token |
telegram_chat_id | Valgfritt Streng | Tilgjengelig når: type = telegram Telegram chat-ID |
microsoft_teams | Valgfritt Streng | Tilgjengelig når: type = microsoft_teams Microsoft Teams webhook-URL |
is_enabled | Valgfritt 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}' \