Paziņojumu apstrādātāji
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}' \
| Parametri | Detaļas | Apraksts |
|---|---|---|
| page | Neobligāts Vesels skaitlis | Lapas numurs, no kuras vēlaties rezultātus. Noklusējums ir 1. |
| results_per_page | Neobligāts Vesels skaitlis | Cik rezultātus vēlaties vienā lapā. Atļautās vērtības ir: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Noklusējums ir 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:12",
}
],
"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:12",
}
}
POST https://bitpeak.ru/api/notification-handlers
| Parametri | Detaļas | Apraksts |
|---|---|---|
| name | Obligāts Virkne | - |
| type | Obligāts Virkne | Atļautās vērtības: email , webhook , slack , discord , telegram , microsoft_teams , x , google_chat , internal_notification |
| Neobligāts Virkne | Pieejams, kad: type = email E-pasts | |
| webhook | Neobligāts Virkne | Pieejams, kad: type = webhook Webhook URL |
| slack | Neobligāts Virkne | Pieejams, kad: type = slack Slack webhook URL |
| discord | Neobligāts Virkne | Pieejams, kad: type = discord Discord webhook URL |
| telegram | Neobligāts Virkne | Pieejams, kad: type = telegram Telegram API Token |
| telegram_chat_id | Neobligāts Virkne | Pieejams, kad: type = telegram Telegram Čata ID |
| microsoft_teams | Neobligāts Virkne | Pieejams, kad: type = microsoft_teams Microsoft Teams webhook URL |
| google_chat | Neobligāts Virkne | Pieejams, kad: type = google_chat Google chat webhook URL |
| x_consumer_key | Neobligāts Virkne | Pieejams, kad: type = x Telegram API Token |
| x_consumer_secret | Neobligāts Virkne | Pieejams, kad: type = x Telegram API Token |
| x_access_token | Neobligāts Virkne | Pieejams, kad: type = x Telegram API Token |
| x_access_token_secret | Neobligāts Virkne | Pieejams, kad: 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}
| Parametri | Detaļas | Apraksts |
|---|---|---|
| name | Neobligāts Virkne | - |
| type | Neobligāts Virkne | Atļautās vērtības: email , webhook , slack , discord , telegram , microsoft_teams , x , google_chat , internal_notification |
| Neobligāts Virkne | Pieejams, kad: type = email E-pasts | |
| webhook | Neobligāts Virkne | Pieejams, kad: type = webhook Webhook URL |
| slack | Neobligāts Virkne | Pieejams, kad: type = slack Slack webhook URL |
| discord | Neobligāts Virkne | Pieejams, kad: type = discord Discord webhook URL |
| telegram | Neobligāts Virkne | Pieejams, kad: type = telegram Telegram API Token |
| telegram_chat_id | Neobligāts Virkne | Pieejams, kad: type = telegram Telegram Čata ID |
| microsoft_teams | Neobligāts Virkne | Pieejams, kad: type = microsoft_teams Microsoft Teams webhook URL |
| google_chat | Neobligāts Virkne | Pieejams, kad: type = google_chat Google chat webhook URL |
| x_consumer_key | Neobligāts Virkne | Pieejams, kad: type = x Telegram API Token |
| x_consumer_secret | Neobligāts Virkne | Pieejams, kad: type = x Telegram API Token |
| x_access_token | Neobligāts Virkne | Pieejams, kad: type = x Telegram API Token |
| x_access_token_secret | Neobligāts Virkne | Pieejams, kad: type = x Telegram API Token |
| is_enabled | Neobligāts Būla vērtība | - |
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}' \