معالجات الإشعارات
GET https://link.pc.sa/api/notification-handlers/
curl --request GET \
--url 'https://link.pc.sa/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://link.pc.sa/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-11-01 12:58:59",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://link.pc.sa/api/notification-handlers?page=1",
"last": "https://link.pc.sa/api/notification-handlers?page=1",
"next": null,
"prev": null,
"self": "https://link.pc.sa/api/notification-handlers?page=1"
}
}
GET https://link.pc.sa/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://link.pc.sa/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://link.pc.sa/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-11-01 12:58:59",
}
}
POST https://link.pc.sa/api/notification-handlers
| المعلمات | تفاصيل | الوصف |
|---|---|---|
| name | مطلوب سلسلة | - |
| type | مطلوب سلسلة | القيم المسموح بها: email , webhook , slack , discord , telegram , microsoft_teams |
| اختياري سلسلة | متاح عندما: type = email البريد الإلكتروني | |
| webhook | اختياري سلسلة | متاح عندما: type = webhook عنوان URL للويب هوك |
| slack | اختياري سلسلة | متاح عندما: type = slack عنوان URL لربط Slack |
| discord | اختياري سلسلة | متاح عندما: type = discord رابط ويب هوك Discord |
| telegram | اختياري سلسلة | متاح عندما: type = telegram رمز API لتليجرام |
| telegram_chat_id | اختياري سلسلة | متاح عندما: type = telegram معرّف دردشة تيليجرام |
| microsoft_teams | اختياري سلسلة | متاح عندما: type = microsoft_teams عنوان URL الخاص بـ Microsoft Teams webhook |
curl --request POST \
--url 'https://link.pc.sa/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://link.pc.sa/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://link.pc.sa/api/notification-handlers/{notification_handler_id}
| المعلمات | تفاصيل | الوصف |
|---|---|---|
| name | اختياري سلسلة | - |
| type | اختياري سلسلة | القيم المسموح بها: email , webhook , slack , discord , telegram , microsoft_teams |
| اختياري سلسلة | متاح عندما: type = email البريد الإلكتروني | |
| webhook | اختياري سلسلة | متاح عندما: type = webhook عنوان URL للويب هوك |
| slack | اختياري سلسلة | متاح عندما: type = slack عنوان URL لربط Slack |
| discord | اختياري سلسلة | متاح عندما: type = discord رابط ويب هوك Discord |
| telegram | اختياري سلسلة | متاح عندما: type = telegram رمز API لتليجرام |
| telegram_chat_id | اختياري سلسلة | متاح عندما: type = telegram معرّف دردشة تيليجرام |
| microsoft_teams | اختياري سلسلة | متاح عندما: type = microsoft_teams عنوان URL الخاص بـ Microsoft Teams webhook |
| is_enabled | اختياري منطقي | - |
curl --request POST \
--url 'https://link.pc.sa/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://link.pc.sa/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://link.pc.sa/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://link.pc.sa/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://link.pc.sa/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \