Procedury obsługi powiadomień

GET https://uptime4.com/api/notification-handlers/
curl --request GET \
--url 'https://uptime4.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Parametry Szczegóły Opis
page Optional Liczba całkowita Numer strony, z której chcesz uzyskać wyniki. Domyślnie 1.
results_per_page Optional Liczba całkowita Ile wyników chcesz uzyskać na stronę. Dozwolone wartości to: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Domyślnie jest to 25.
{ "data": [ { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "hey@example.com" }, "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://uptime4.com/api/notification-handlers?&page=1", "last": "https://uptime4.com/api/notification-handlers?&page=1", "next": null, "prev": null, "self": "https://uptime4.com/api/notification-handlers?&page=1" } }
GET https://uptime4.com/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://uptime4.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
{ "data": { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "hey@example.com" }, "is_enabled": true, "last_datetime": null, "datetime": "2021-06-27 22:16:23" } }
POST https://uptime4.com/api/notification-handlers
Parametry Szczegóły Opis
name Wymagane Ciąg -
type Wymagane Ciąg Dozwolone wartości: email , webhook , slack , discord , telegram , microsoft_teams , twilio , twilio_call , whatsapp , x , push_subscriber_id
email Optional Ciąg Available when: type = email E-mail
webhook Optional Ciąg Available when: type = webhook URL webhooka
slack Optional Ciąg Available when: type = slack URL webhooka Slack
discord Optional Ciąg Available when: type = discord URL webhooka Discord
telegram Optional Ciąg Available when: type = telegram Token API Telegramu
telegram_chat_id Optional Ciąg Available when: type = telegram ID czatu telegramowego
x_consumer_key Optional Ciąg Available when: type = x Token API Telegramu
x_consumer_secret Optional Ciąg Available when: type = x Token API Telegramu
x_access_token Optional Ciąg Available when: type = x Token API Telegramu
x_access_token_secret Optional Ciąg Available when: type = x Token API Telegramu
twilio Optional Ciąg Available when: type = twilio Numer telefonu
twilio_call Optional Ciąg Available when: type = twilio_call Numer telefonu
whatsapp Optional Ciąg Available when: type = whatsapp Numer telefonu
curl --request POST \
--url 'https://uptime4.com/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=hello@example.com' \
{ "data": { "id": 1 } }
POST https://uptime4.com/api/notification-handlers/{notification_handler_id}
Parametry Szczegóły Opis
name Optional Ciąg -
type Optional Ciąg Dozwolone wartości: email , webhook , slack , discord , telegram , microsoft_teams , twilio , twilio_call , whatsapp , x , push_subscriber_id
email Optional Ciąg Available when: type = email E-mail
webhook Optional Ciąg Available when: type = webhook URL webhooka
slack Optional Ciąg Available when: type = slack URL webhooka Slack
discord Optional Ciąg Available when: type = discord URL webhooka Discord
telegram Optional Ciąg Available when: type = telegram Token API Telegramu
telegram_chat_id Optional Ciąg Available when: type = telegram ID czatu telegramowego
x_consumer_key Optional Ciąg Available when: type = x Token API Telegramu
x_consumer_secret Optional Ciąg Available when: type = x Token API Telegramu
x_access_token Optional Ciąg Available when: type = x Token API Telegramu
x_access_token_secret Optional Ciąg Available when: type = x Token API Telegramu
twilio Optional Ciąg Available when: type = twilio Numer telefonu
twilio_call Optional Ciąg Available when: type = twilio_call Numer telefonu
whatsapp Optional Ciąg Available when: type = whatsapp Numer telefonu
is_enabled Optional Boolean -
curl --request POST \
--url 'https://uptime4.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://uptime4.com/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://uptime4.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \