Χειριστές ειδοποιήσεων
GET https://dmpilot.ru/api/notification-handlers/
curl --request GET \
--url 'https://dmpilot.ru/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://dmpilot.ru/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Παράμετροι | Λεπτομέρειες | Περιγραφή |
---|---|---|
page | Προαιρετικό Ακέραιος | Αριθμός σελίδας. Προεπιλογή: 1 . |
results_per_page | Προαιρετικό Ακέραιος | Αποτελέσματα ανά σελίδα. Επιτρεπόμενες τιμές: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Προεπιλογή: 25 . |
{
"data": [
{
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "hey@example.com"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-05-19 04:11:59"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://dmpilot.ru/api/notification-handlers?&page=1",
"last": "https://dmpilot.ru/api/notification-handlers?&page=1",
"next": null,
"prev": null,
"self": "https://dmpilot.ru/api/notification-handlers?&page=1"
}
}
GET https://dmpilot.ru/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://dmpilot.ru/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://dmpilot.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-05-19 04:11:59"
}
}
POST https://dmpilot.ru/api/notification-handlers
Παράμετροι | Λεπτομέρειες | Περιγραφή |
---|---|---|
name | Απαιτείται String | - |
type | Απαιτείται String | Επιτρεπόμενες τιμές: email , webhook , slack , discord , telegram , microsoft_teams |
Προαιρετικό String | Διαθέσιμο όταν: type = email Email | |
webhook | Προαιρετικό String | Διαθέσιμο όταν: type = webhook URL webhook |
slack | Προαιρετικό String | Διαθέσιμο όταν: type = slack URL Slack webhook |
discord | Προαιρετικό String | Διαθέσιμο όταν: type = discord URL Discord webhook |
telegram | Προαιρετικό String | Διαθέσιμο όταν: type = telegram Telegram API Token |
telegram_chat_id | Προαιρετικό String | Διαθέσιμο όταν: type = telegram Telegram Chat ID |
x_consumer_key | Προαιρετικό String | Διαθέσιμο όταν: type = x Telegram API Token |
x_consumer_secret | Προαιρετικό String | Διαθέσιμο όταν: type = x Telegram API Token |
x_access_token | Προαιρετικό String | Διαθέσιμο όταν: type = x Telegram API Token |
x_access_token_secret | Προαιρετικό String | Διαθέσιμο όταν: type = x Telegram API Token |
curl --request POST \
--url 'https://dmpilot.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://dmpilot.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://dmpilot.ru/api/notification-handlers/{notification_handler_id}
Παράμετροι | Λεπτομέρειες | Περιγραφή |
---|---|---|
name | Προαιρετικό String | - |
type | Προαιρετικό String | Επιτρεπόμενες τιμές: email , webhook , slack , discord , telegram , microsoft_teams |
Προαιρετικό String | Διαθέσιμο όταν: type = email Email | |
webhook | Προαιρετικό String | Διαθέσιμο όταν: type = webhook URL webhook |
slack | Προαιρετικό String | Διαθέσιμο όταν: type = slack URL Slack webhook |
discord | Προαιρετικό String | Διαθέσιμο όταν: type = discord URL Discord webhook |
telegram | Προαιρετικό String | Διαθέσιμο όταν: type = telegram Telegram API Token |
telegram_chat_id | Προαιρετικό String | Διαθέσιμο όταν: type = telegram Telegram Chat ID |
x_consumer_key | Προαιρετικό String | Διαθέσιμο όταν: type = x Telegram API Token |
x_consumer_secret | Προαιρετικό String | Διαθέσιμο όταν: type = x Telegram API Token |
x_access_token | Προαιρετικό String | Διαθέσιμο όταν: type = x Telegram API Token |
x_access_token_secret | Προαιρετικό String | Διαθέσιμο όταν: type = x Telegram API Token |
is_enabled | Προαιρετικό Boolean | - |
curl --request POST \
--url 'https://dmpilot.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://dmpilot.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://dmpilot.ru/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://dmpilot.ru/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://dmpilot.ru/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \