ตัวจัดการการแจ้งเตือน
GET https://tistos.com/api/notification-handlers/
curl --request GET \
--url 'https://tistos.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://tistos.com/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": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2025-10-16 07:03:36", } ], "meta": { "page": 1, "results_per_page": 25, "total": 1, "total_pages": 1 }, "links": { "first": "https://tistos.com/api/notification-handlers?page=1", "last": "https://tistos.com/api/notification-handlers?page=1", "next": null, "prev": null, "self": "https://tistos.com/api/notification-handlers?page=1" } }
GET https://tistos.com/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
{ "data": { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2025-10-16 07:03:36", } }
POST https://tistos.com/api/notification-handlers
พารามิเตอร์ | รายละเอียด | คำอธิบาย |
---|---|---|
name | จำเป็น สตริง | - |
type | จำเป็น สตริง | ค่าที่อนุญาต: email , webhook , slack , discord , telegram , microsoft_teams |
ทางเลือก สตริง | มีให้บริการเมื่อ: type = email อีเมล | |
webhook | ทางเลือก สตริง | มีให้บริการเมื่อ: type = webhook URL ของ webhook |
slack | ทางเลือก สตริง | มีให้บริการเมื่อ: type = slack URL ของ Slack webhook |
discord | ทางเลือก สตริง | มีให้บริการเมื่อ: type = discord URL ของ Discord webhook |
telegram | ทางเลือก สตริง | มีให้บริการเมื่อ: type = telegram โทเค็น API ของ Telegram |
telegram_chat_id | ทางเลือก สตริง | มีให้บริการเมื่อ: type = telegram รหัสแชท Telegram |
microsoft_teams | ทางเลือก สตริง | มีให้บริการเมื่อ: type = microsoft_teams URL ของ Microsoft Teams webhook |
curl --request POST \
--url 'https://tistos.com/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=[email protected]' \
--url 'https://tistos.com/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=[email protected]' \
{ "data": { "id": 1 } }
POST https://tistos.com/api/notification-handlers/{notification_handler_id}
พารามิเตอร์ | รายละเอียด | คำอธิบาย |
---|---|---|
name | ทางเลือก สตริง | - |
type | ทางเลือก สตริง | ค่าที่อนุญาต: email , webhook , slack , discord , telegram , microsoft_teams |
ทางเลือก สตริง | มีให้บริการเมื่อ: type = email อีเมล | |
webhook | ทางเลือก สตริง | มีให้บริการเมื่อ: type = webhook URL ของ webhook |
slack | ทางเลือก สตริง | มีให้บริการเมื่อ: type = slack URL ของ Slack webhook |
discord | ทางเลือก สตริง | มีให้บริการเมื่อ: type = discord URL ของ Discord webhook |
telegram | ทางเลือก สตริง | มีให้บริการเมื่อ: type = telegram โทเค็น API ของ Telegram |
telegram_chat_id | ทางเลือก สตริง | มีให้บริการเมื่อ: type = telegram รหัสแชท Telegram |
microsoft_teams | ทางเลือก สตริง | มีให้บริการเมื่อ: type = microsoft_teams URL ของ Microsoft Teams webhook |
is_enabled | ทางเลือก บูลีน | - |
curl --request POST \
--url 'https://tistos.com/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://tistos.com/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://tistos.com/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \