Summary
The Notifications API currently supports listing notifications, marking selected notifications as read, and deleting individual notifications. However, it lacks endpoints for common bulk operations and retrieving the unread notification count.
Proposed Changes
Add the following endpoints:
GET /api/v1/notifications/unread-count — Return the number of unread notifications for the authenticated user.
POST /api/v1/notifications/read-all — Mark all unread notifications belonging to the authenticated user as read.
DELETE /api/v1/notifications/read — Delete all read notifications belonging to the authenticated user.
Motivation
These endpoints simplify notification management by reducing the number of API calls required for common operations such as displaying unread badges, marking all notifications as read, and clearing previously read notifications.
Acceptance Criteria
- Implement GET /api/v1/notifications/unread-count.
- Implement POST /api/v1/notifications/read-all.
- Implement DELETE /api/v1/notifications/read.
Summary
The Notifications API currently supports listing notifications, marking selected notifications as read, and deleting individual notifications. However, it lacks endpoints for common bulk operations and retrieving the unread notification count.
Proposed Changes
Add the following endpoints:
GET /api/v1/notifications/unread-count — Return the number of unread notifications for the authenticated user.
POST /api/v1/notifications/read-all — Mark all unread notifications belonging to the authenticated user as read.
DELETE /api/v1/notifications/read — Delete all read notifications belonging to the authenticated user.
Motivation
These endpoints simplify notification management by reducing the number of API calls required for common operations such as displaying unread badges, marking all notifications as read, and clearing previously read notifications.
Acceptance Criteria