通知ハンドラー
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 | 任意 整数 | 1ページあたりの結果数。許可値: 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-06-07 02:06:41"
}
],
"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-06-07 02:06:41"
}
}
POST https://dmpilot.ru/api/notification-handlers
パラメーター | 詳細 | 説明 |
---|---|---|
name | 必須 文字列 | - |
type | 必須 文字列 | 許可値: email , webhook , slack , discord , telegram , microsoft_teams |
任意 文字列 | 利用可能条件: type = email メール | |
webhook | 任意 文字列 | 利用可能条件: type = webhook Webhook URL |
slack | 任意 文字列 | 利用可能条件: type = slack Slack Webhook URL |
discord | 任意 文字列 | 利用可能条件: type = discord Discord Webhook URL |
telegram | 任意 文字列 | 利用可能条件: type = telegram Telegram APIトークン |
telegram_chat_id | 任意 文字列 | 利用可能条件: type = telegram TelegramチャットID |
x_consumer_key | 任意 文字列 | 利用可能条件: type = x Telegram APIトークン |
x_consumer_secret | 任意 文字列 | 利用可能条件: type = x Telegram APIトークン |
x_access_token | 任意 文字列 | 利用可能条件: type = x Telegram APIトークン |
x_access_token_secret | 任意 文字列 | 利用可能条件: type = x Telegram APIトークン |
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 | 任意 文字列 | - |
type | 任意 文字列 | 許可値: email , webhook , slack , discord , telegram , microsoft_teams |
任意 文字列 | 利用可能条件: type = email メール | |
webhook | 任意 文字列 | 利用可能条件: type = webhook Webhook URL |
slack | 任意 文字列 | 利用可能条件: type = slack Slack Webhook URL |
discord | 任意 文字列 | 利用可能条件: type = discord Discord Webhook URL |
telegram | 任意 文字列 | 利用可能条件: type = telegram Telegram APIトークン |
telegram_chat_id | 任意 文字列 | 利用可能条件: type = telegram TelegramチャットID |
x_consumer_key | 任意 文字列 | 利用可能条件: type = x Telegram APIトークン |
x_consumer_secret | 任意 文字列 | 利用可能条件: type = x Telegram APIトークン |
x_access_token | 任意 文字列 | 利用可能条件: type = x Telegram APIトークン |
x_access_token_secret | 任意 文字列 | 利用可能条件: type = x Telegram APIトークン |
is_enabled | 任意 真偽値 | - |
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}' \