Meldingshandlers
GET https://uptime4.com/api/notification-handlers/
curl --request GET \
--url 'https://uptime4.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptime4.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Parameters | Details | Beschrijving |
---|---|---|
page | Optional Geheel getal | Het paginanummer waarvan u resultaten wilt ontvangen. Standaard ingesteld op 1 . |
results_per_page | Optional Geheel getal | Hoeveel resultaten je per pagina wilt hebben. Toegestane waarden zijn: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Standaard ingesteld op 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}' \
--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
Parameters | Details | Beschrijving |
---|---|---|
name | Vereist String | - |
type | Vereist String | Toegestane waarden: email , webhook , slack , discord , telegram , microsoft_teams , twilio , twilio_call , whatsapp , x , push_subscriber_id |
Optional String | Available when: type = email E-mail | |
webhook | Optional String | Available when: type = webhook Webhook-URL |
slack | Optional String | Available when: type = slack Slappe webhook-URL |
discord | Optional String | Available when: type = discord Onenigheidswebhook-URL |
telegram | Optional String | Available when: type = telegram Telegram API-token |
telegram_chat_id | Optional String | Available when: type = telegram Telegram Chat-ID |
x_consumer_key | Optional String | Available when: type = x Telegram API-token |
x_consumer_secret | Optional String | Available when: type = x Telegram API-token |
x_access_token | Optional String | Available when: type = x Telegram API-token |
x_access_token_secret | Optional String | Available when: type = x Telegram API-token |
twilio | Optional String | Available when: type = twilio Telefoonnummer |
twilio_call | Optional String | Available when: type = twilio_call Telefoonnummer |
Optional String | Available when: type = whatsapp Telefoonnummer |
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' \
--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}
Parameters | Details | Beschrijving |
---|---|---|
name | Optional String | - |
type | Optional String | Toegestane waarden: email , webhook , slack , discord , telegram , microsoft_teams , twilio , twilio_call , whatsapp , x , push_subscriber_id |
Optional String | Available when: type = email E-mail | |
webhook | Optional String | Available when: type = webhook Webhook-URL |
slack | Optional String | Available when: type = slack Slappe webhook-URL |
discord | Optional String | Available when: type = discord Onenigheidswebhook-URL |
telegram | Optional String | Available when: type = telegram Telegram API-token |
telegram_chat_id | Optional String | Available when: type = telegram Telegram Chat-ID |
x_consumer_key | Optional String | Available when: type = x Telegram API-token |
x_consumer_secret | Optional String | Available when: type = x Telegram API-token |
x_access_token | Optional String | Available when: type = x Telegram API-token |
x_access_token_secret | Optional String | Available when: type = x Telegram API-token |
twilio | Optional String | Available when: type = twilio Telefoonnummer |
twilio_call | Optional String | Available when: type = twilio_call Telefoonnummer |
Optional String | Available when: type = whatsapp Telefoonnummer | |
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' \
--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}' \
--url 'https://uptime4.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \