Ilmoitusten käsittelijät
GET https://bitpeak.ru/api/notification-handlers/
curl --request GET \
--url 'https://bitpeak.ru/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitpeak.ru/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
| Parametrit | Yksityiskohdat | Kuvaus |
|---|---|---|
| page | Valinnainen Kokonaisluku | Sivunumero, jolta haluat tulokset. Oletus on 1. |
| results_per_page | Valinnainen Kokonaisluku | Kuinka monta tulosta haluat per sivu. Sallitut arvot ovat: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Oletus on 25. |
{
"data": [
{
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "hey@example.com"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-12-06 16:02:39",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://bitpeak.ru/api/notification-handlers?page=1",
"last": "https://bitpeak.ru/api/notification-handlers?page=1",
"next": null,
"prev": null,
"self": "https://bitpeak.ru/api/notification-handlers?page=1"
}
}
GET https://bitpeak.ru/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://bitpeak.ru/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitpeak.ru/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": "2025-12-06 16:02:39",
}
}
POST https://bitpeak.ru/api/notification-handlers
| Parametrit | Yksityiskohdat | Kuvaus |
|---|---|---|
| name | Pakollinen Merkkijono | - |
| type | Pakollinen Merkkijono | Sallitut arvot: email , webhook , slack , discord , telegram , microsoft_teams , x , google_chat , internal_notification |
| Valinnainen Merkkijono | Saatavilla kun: type = email Sähköposti | |
| webhook | Valinnainen Merkkijono | Saatavilla kun: type = webhook Webhook-URL |
| slack | Valinnainen Merkkijono | Saatavilla kun: type = slack Slack-webhook-URL |
| discord | Valinnainen Merkkijono | Saatavilla kun: type = discord Discord-webhook-URL |
| telegram | Valinnainen Merkkijono | Saatavilla kun: type = telegram Telegram API -token |
| telegram_chat_id | Valinnainen Merkkijono | Saatavilla kun: type = telegram Telegram Chat ID |
| microsoft_teams | Valinnainen Merkkijono | Saatavilla kun: type = microsoft_teams Microsoft Teams -webhook-URL |
| google_chat | Valinnainen Merkkijono | Saatavilla kun: type = google_chat Google Chat -webhook-URL |
| x_consumer_key | Valinnainen Merkkijono | Saatavilla kun: type = x Telegram API -token |
| x_consumer_secret | Valinnainen Merkkijono | Saatavilla kun: type = x Telegram API -token |
| x_access_token | Valinnainen Merkkijono | Saatavilla kun: type = x Telegram API -token |
| x_access_token_secret | Valinnainen Merkkijono | Saatavilla kun: type = x Telegram API -token |
curl --request POST \
--url 'https://bitpeak.ru/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://bitpeak.ru/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://bitpeak.ru/api/notification-handlers/{notification_handler_id}
| Parametrit | Yksityiskohdat | Kuvaus |
|---|---|---|
| name | Valinnainen Merkkijono | - |
| type | Valinnainen Merkkijono | Sallitut arvot: email , webhook , slack , discord , telegram , microsoft_teams , x , google_chat , internal_notification |
| Valinnainen Merkkijono | Saatavilla kun: type = email Sähköposti | |
| webhook | Valinnainen Merkkijono | Saatavilla kun: type = webhook Webhook-URL |
| slack | Valinnainen Merkkijono | Saatavilla kun: type = slack Slack-webhook-URL |
| discord | Valinnainen Merkkijono | Saatavilla kun: type = discord Discord-webhook-URL |
| telegram | Valinnainen Merkkijono | Saatavilla kun: type = telegram Telegram API -token |
| telegram_chat_id | Valinnainen Merkkijono | Saatavilla kun: type = telegram Telegram Chat ID |
| microsoft_teams | Valinnainen Merkkijono | Saatavilla kun: type = microsoft_teams Microsoft Teams -webhook-URL |
| google_chat | Valinnainen Merkkijono | Saatavilla kun: type = google_chat Google Chat -webhook-URL |
| x_consumer_key | Valinnainen Merkkijono | Saatavilla kun: type = x Telegram API -token |
| x_consumer_secret | Valinnainen Merkkijono | Saatavilla kun: type = x Telegram API -token |
| x_access_token | Valinnainen Merkkijono | Saatavilla kun: type = x Telegram API -token |
| x_access_token_secret | Valinnainen Merkkijono | Saatavilla kun: type = x Telegram API -token |
| is_enabled | Valinnainen Totuusarvo | - |
curl --request POST \
--url 'https://bitpeak.ru/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://bitpeak.ru/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://bitpeak.ru/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://bitpeak.ru/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://bitpeak.ru/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \