Client — Notifications
Bu sayfa henüz Türkçeye çevrilmedi. İngilizce sürüm gösteriliyor.
GET /api/v1/client/notifications
List notifications (client)
Return paginated notifications for the authenticated client with optional unread/category filters.
Query parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
limit |
integer | no | minimum=1; maximum=200 |
unread_only |
boolean | no | — |
category |
string | no | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/notifications
POST /api/v1/client/notifications/read-all
Mark all read (client)
Mark all unread notifications as read for the authenticated client.
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/notifications/read-all
GET /api/v1/client/notifications/settings
Get notification preferences (client)
Return notification preferences (channel toggles, severity filters) for the authenticated client.
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/notifications/settings
PUT /api/v1/client/notifications/settings
Update notification preferences (client)
Update the authenticated client's own notification toggles (channel and category switches). Server-wide blocks — SMTP, event matrix, templates — are not accepted on this path.
Body fields:
| Field | Type | Required | Notes |
|---|---|---|---|
email_categories |
array |
no | — |
email_enabled |
boolean | no | — |
panel_categories |
array |
no | — |
panel_enabled |
boolean | no | — |
Request body example:
{
"email_categories": [
"string"
],
"email_enabled": false,
"panel_categories": [
"string"
],
"panel_enabled": false
}
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X PUT \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
-H "Content-Type: application/json" \
-d @body.json \
https://your-server:2000/api/v1/client/notifications/settings
GET /api/v1/client/notifications/unread-count
Get unread count (client)
Return the count of unread notifications for the authenticated client.
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X GET \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/notifications/unread-count
POST /api/v1/client/notifications/{notif_id}/read
Mark notification read (client)
Mark a single notification as read for the authenticated client.
Path parameters:
| Name | Type | Required | Notes |
|---|---|---|---|
notif_id |
string | yes | — |
Responses:
| Status | Schema | Description |
|---|---|---|
200 |
ApiSuccess_dict_str__Any__ |
Successful Response |
422 |
HTTPValidationError |
Validation Error |
Response example (200):
{
"data": {},
"message": "",
"status": "success",
"warnings": [
"string"
]
}
cURL example:
curl -X POST \
-H "X-WHost-Key: $WHOST_API_KEY" \
-H "X-WHost-Timestamp: $(date +%s)" \
-H "X-WHost-Nonce: $(openssl rand -hex 16)" \
-H "X-WHost-Signature: $(compute_hmac)" \
https://your-server:2000/api/v1/client/notifications/{notif_id}/read
Yukarıda bulamadığınız her şey için destek ekibimiz her zaman yanınızda.