Enrutadores
GET https://get.widgy.app/api/notification-handlers/
curl --request GET \
--url 'https://get.widgy.app/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://get.widgy.app/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Parámetros | Detalles | Descripción |
---|---|---|
page | Opcional Integer | El número de página del que deseas obtener resultados. Por defecto es 1 . |
results_per_page | Opcional Integer | Cuántos resultados deseas por página. Valores permitidos son: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Por defecto 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://get.widgy.app/api/notification-handlers?&page=1",
"last": "https://get.widgy.app/api/notification-handlers?&page=1",
"next": null,
"prev": null,
"self": "https://get.widgy.app/api/notification-handlers?&page=1"
}
}
GET https://get.widgy.app/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://get.widgy.app/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://get.widgy.app/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://get.widgy.app/api/notification-handlers
Parámetros | Detalles | Descripción |
---|---|---|
name | Requerido String | - |
type | Requerido String | Valores permitidos: email , webhook , slack , discord , telegram , microsoft_teams |
Opcional String | Disponible cuando: type = email Correo electrónico | |
webhook | Opcional String | Disponible cuando: type = webhook URL de Webhook |
slack | Opcional String | Disponible cuando: type = slack URL de Webhook de Slack |
discord | Opcional String | Disponible cuando: type = discord URL de Webhook de Discord |
telegram | Opcional String | Disponible cuando: type = telegram Token de API de Telegram |
telegram_chat_id | Opcional String | Disponible cuando: type = telegram ID del Chat de Telegram |
curl --request POST \
--url 'https://get.widgy.app/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://get.widgy.app/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://get.widgy.app/api/notification-handlers/{notification_handler_id}
Parámetros | Detalles | Descripción |
---|---|---|
name | Opcional String | - |
type | Opcional String | Valores permitidos: email , webhook , slack , discord , telegram , microsoft_teams |
Opcional String | Disponible cuando: type = email Correo electrónico | |
webhook | Opcional String | Disponible cuando: type = webhook URL de Webhook |
slack | Opcional String | Disponible cuando: type = slack URL de Webhook de Slack |
discord | Opcional String | Disponible cuando: type = discord URL de Webhook de Discord |
telegram | Opcional String | Disponible cuando: type = telegram Token de API de Telegram |
telegram_chat_id | Opcional String | Disponible cuando: type = telegram ID del Chat de Telegram |
is_enabled | Opcional Booleao | - |
curl --request POST \
--url 'https://get.widgy.app/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://get.widgy.app/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://get.widgy.app/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://get.widgy.app/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://get.widgy.app/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \