Pengelola notifikasi
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}' \
Parameter | Rincian | Deskripsi |
---|---|---|
page | Opsional Bilangan bulat | Nomor halaman yang Anda inginkan hasilnya. Secara default adalah 1 . |
results_per_page | Opsional Bilangan bulat | Berapa banyak hasil yang Anda inginkan per halaman. Nilai yang diizinkan adalah: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Secara default adalah 25 . |
{
"data": [
{
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "[email protected]"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-07-27 05:45:55"
}
],
"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-07-27 05:45:55"
}
}
POST https://tistos.com/api/notification-handlers
Parameter | Rincian | Deskripsi |
---|---|---|
name | Diperlukan String | - |
type | Diperlukan String | Nilai yang diizinkan: email , webhook , slack , discord , telegram , microsoft_teams |
Opsional String | Tersedia ketika: type = email Email | |
webhook | Opsional String | Tersedia ketika: type = webhook URL webhook |
slack | Opsional String | Tersedia ketika: type = slack URL webhook Slack |
discord | Opsional String | Tersedia ketika: type = discord URL webhook Discord |
telegram | Opsional String | Tersedia ketika: type = telegram Token API Telegram |
telegram_chat_id | Opsional String | Tersedia ketika: type = telegram ID Obrolan Telegram |
x_consumer_key | Opsional String | Tersedia ketika: type = x Token API Telegram |
x_consumer_secret | Opsional String | Tersedia ketika: type = x Token API Telegram |
x_access_token | Opsional String | Tersedia ketika: type = x Token API Telegram |
x_access_token_secret | Opsional String | Tersedia ketika: type = x Token API Telegram |
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}
Parameter | Rincian | Deskripsi |
---|---|---|
name | Opsional String | - |
type | Opsional String | Nilai yang diizinkan: email , webhook , slack , discord , telegram , microsoft_teams |
Opsional String | Tersedia ketika: type = email Email | |
webhook | Opsional String | Tersedia ketika: type = webhook URL webhook |
slack | Opsional String | Tersedia ketika: type = slack URL webhook Slack |
discord | Opsional String | Tersedia ketika: type = discord URL webhook Discord |
telegram | Opsional String | Tersedia ketika: type = telegram Token API Telegram |
telegram_chat_id | Opsional String | Tersedia ketika: type = telegram ID Obrolan Telegram |
x_consumer_key | Opsional String | Tersedia ketika: type = x Token API Telegram |
x_consumer_secret | Opsional String | Tersedia ketika: type = x Token API Telegram |
x_access_token | Opsional String | Tersedia ketika: type = x Token API Telegram |
x_access_token_secret | Opsional String | Tersedia ketika: type = x Token API Telegram |
is_enabled | Opsional Boolean | - |
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}' \