1. The endpoint must accept a HTTP GET method.
2. The user must be authenticated.
3. The endpoint must retrieve user notifications from the database using the provided user's ID.
4. The endpoint should return a 200 OK status code with the notifications in the body.
5. The endpoint should support pagination via parameter page and page size
Authorization
{ headers : Bearer {{token}}}
Request Example
GET /api/user/{userId}/notifications?page=1&page_size=5
No request body is needed for this endpoint.
Description
Create an API endpoint to get user notifications.
Acceptance Criteria
1. The endpoint must accept a HTTP GET method. 2. The user must be authenticated. 3. The endpoint must retrieve user notifications from the database using the provided user's ID. 4. The endpoint should return a 200 OK status code with the notifications in the body. 5. The endpoint should support pagination via parameter page and page size
Authorization
{ headers : Bearer {{token}}}
Request Example
GET /api/user/{userId}/notifications?page=1&page_size=5 No request body is needed for this endpoint.
Responses
Successful response
Error response
Purpose
Provides a backend service that allows a user to access notifications when the user performs an activity.
Requirements
Expected Outcome
The endpoint ensures that users receive notifications at the end of an activity.
Status codes
Testing