Manejadores de notificaciones
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}' \
Parámetros | Detalles | Descripción |
---|---|---|
page | Opcional Entero | El número de página del que desea obtener los resultados. El valor predeterminado es |
results_per_page | Opcional Entero | Cuántos resultados desea por página. Los valores permitidos son: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . El valor predeterminado es 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
Parámetros | Detalles | Descripción |
---|---|---|
name | Obligatorio Cadena | - |
type | Obligatorio Cadena | Valores permitidos: email , webhook , slack , discord , telegram , microsoft_teams , twilio , twilio_call , whatsapp , x , push_subscriber_id |
Opcional Cadena | Available when: type = email Correo electrónico | |
webhook | Opcional Cadena | Available when: type = webhook URL del webhook |
slack | Opcional Cadena | Available when: type = slack URL de webhook de Slack |
discord | Opcional Cadena | Available when: type = discord URL del webhook de Discord |
telegram | Opcional Cadena | Available when: type = telegram Token API de Telegram |
telegram_chat_id | Opcional Cadena | Available when: type = telegram ID de chat de Telegram |
x_consumer_key | Opcional Cadena | Available when: type = x Token API de Telegram |
x_consumer_secret | Opcional Cadena | Available when: type = x Token API de Telegram |
x_access_token | Opcional Cadena | Available when: type = x Token API de Telegram |
x_access_token_secret | Opcional Cadena | Available when: type = x Token API de Telegram |
twilio | Opcional Cadena | Available when: type = twilio Número de teléfono |
twilio_call | Opcional Cadena | Available when: type = twilio_call Número de teléfono |
Opcional Cadena | Available when: type = whatsapp Número de teléfono |
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}
Parámetros | Detalles | Descripción |
---|---|---|
name | Opcional Cadena | - |
type | Opcional Cadena | Valores permitidos: email , webhook , slack , discord , telegram , microsoft_teams , twilio , twilio_call , whatsapp , x , push_subscriber_id |
Opcional Cadena | Available when: type = email Correo electrónico | |
webhook | Opcional Cadena | Available when: type = webhook URL del webhook |
slack | Opcional Cadena | Available when: type = slack URL de webhook de Slack |
discord | Opcional Cadena | Available when: type = discord URL del webhook de Discord |
telegram | Opcional Cadena | Available when: type = telegram Token API de Telegram |
telegram_chat_id | Opcional Cadena | Available when: type = telegram ID de chat de Telegram |
x_consumer_key | Opcional Cadena | Available when: type = x Token API de Telegram |
x_consumer_secret | Opcional Cadena | Available when: type = x Token API de Telegram |
x_access_token | Opcional Cadena | Available when: type = x Token API de Telegram |
x_access_token_secret | Opcional Cadena | Available when: type = x Token API de Telegram |
twilio | Opcional Cadena | Available when: type = twilio Número de teléfono |
twilio_call | Opcional Cadena | Available when: type = twilio_call Número de teléfono |
Opcional Cadena | Available when: type = whatsapp Número de teléfono | |
is_enabled | Opcional Booleano | - |
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}' \