Gestionnaires notifications
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}' \
Paramètres | Détails | Description |
---|---|---|
page | Optionnel Integer | Numéro de page. Par défaut 1 . |
results_per_page | Optionnel Integer | Résultats par page. Valeurs : 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Défaut : 25 . |
{
"data": [
{
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "hey@example.com"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-05-19 05:31:08"
}
],
"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 05:31:08"
}
}
POST https://dmpilot.ru/api/notification-handlers
Paramètres | Détails | Description |
---|---|---|
name | Requis String | - |
type | Requis String | Valeurs autorisées : email , webhook , slack , discord , telegram , microsoft_teams |
Optionnel String | Disponible quand : type = email Email | |
webhook | Optionnel String | Disponible quand : type = webhook URL Webhook |
slack | Optionnel String | Disponible quand : type = slack URL Webhook Slack |
discord | Optionnel String | Disponible quand : type = discord URL Webhook Discord |
telegram | Optionnel String | Disponible quand : type = telegram Token API Telegram |
telegram_chat_id | Optionnel String | Disponible quand : type = telegram ID Chat Telegram |
x_consumer_key | Optionnel String | Disponible quand : type = x Token API Telegram |
x_consumer_secret | Optionnel String | Disponible quand : type = x Token API Telegram |
x_access_token | Optionnel String | Disponible quand : type = x Token API Telegram |
x_access_token_secret | Optionnel String | Disponible quand : type = x Token API Telegram |
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}
Paramètres | Détails | Description |
---|---|---|
name | Optionnel String | - |
type | Optionnel String | Valeurs autorisées : email , webhook , slack , discord , telegram , microsoft_teams |
Optionnel String | Disponible quand : type = email Email | |
webhook | Optionnel String | Disponible quand : type = webhook URL Webhook |
slack | Optionnel String | Disponible quand : type = slack URL Webhook Slack |
discord | Optionnel String | Disponible quand : type = discord URL Webhook Discord |
telegram | Optionnel String | Disponible quand : type = telegram Token API Telegram |
telegram_chat_id | Optionnel String | Disponible quand : type = telegram ID Chat Telegram |
x_consumer_key | Optionnel String | Disponible quand : type = x Token API Telegram |
x_consumer_secret | Optionnel String | Disponible quand : type = x Token API Telegram |
x_access_token | Optionnel String | Disponible quand : type = x Token API Telegram |
x_access_token_secret | Optionnel String | Disponible quand : type = x Token API Telegram |
is_enabled | Optionnel 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}' \