This API provides endpoints for managing domain notifications. It allows users to subscribe to domain updates, unsubscribe from notifications, and retrieve notification information. The service integrates with other services REST API's for adding and deleteing notificaitons and RabbitMQ for automated notifications and handles sending email notifications (currently mocked).
Retrieve all notifications.
Responses:
- 200: List of notifications
- 200: Empty list if no notifications found
Retrieve notifications for a specific user.
Parameters:
email
: User's email address
Responses:
- 200: List of user notifications
- 200: Empty list if no notifications found
Add a new notification subscription.
Request Body:
{
"domain_name": "example.com",
"email": "user@example.com"
}
Responses:
- 201: Notification added
- 400: Invalid input
- 409: Notification already exists
Remove a notification subscription.
Request Body:
{
"domain_name": "example.com",
"email": "user@example.com"
}
Responses:
- 200: Notification removed
- 400: Invalid input
- 404: Notification not found
Check if the service is running.
Responses:
- 200: Service is running
To use this API, send HTTP requests to the endpoints. For example:
GET /notifications
GET /notifications/user/user@example.com
POST /notification
DELETE /notification
GET /heartbeat
The API uses standard HTTP status codes to indicate success or failure. Errors return a JSON response with an error message.
All responses are in JSON format. Notifications are returned as objects or arrays of objects.