-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Base URL:
http://localhost:8081Auth: Bearer JWT token inAuthorizationheader Format: All dates in ISO 8601 βyyyy-MM-ddTHH:mm:ss
- Authentication
- Events
- Venues
- Organizations
- User Profile
- Categories
- Event Registration
- Waitlist
- Reviews & Ratings
- Bookmarks
- Notifications
- Dashboard & Analytics
- Export
- Admin
- AI Recommendations
- System
- Error Reference
Register a new user account.
Auth: Public
Request:
{
"name": "Shubham Kale",
"email": "shubham@example.com",
"password": "secret123"
}Response β 200 OK:
{
"token": "eyJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiVVNFUiIsInN1YiI6InNodWJoYW1AZXhhbXBsZS5jb20ifQ.abc123",
"email": "shubham@example.com",
"name": "Shubham Kale",
"role": "USER"
}Error β 400 Duplicate Email:
{
"status": 400,
"message": "Email already registered: shubham@example.com",
"timestamp": "2026-05-24T10:30:00"
}Error β 400 Validation:
{
"name": "Name is required",
"email": "Please provide a valid email address",
"password": "Password must be at least 6 characters"
}Authenticate and receive a JWT token.
Auth: Public
Request:
{
"email": "shubham@example.com",
"password": "secret123"
}Response β 200 OK:
{
"token": "eyJhbGciOiJIUzI1NiJ9...",
"email": "shubham@example.com",
"name": "Shubham Kale",
"role": "USER"
}Error β 401:
{
"status": 401,
"message": "Invalid email or password",
"timestamp": "2026-05-24T10:30:00"
}Note: The message never reveals whether email or password was wrong. Intentional security behavior.
Trigger Google OAuth2 login. Open this URL in a browser. After Google authentication, returns JWT token identical to regular login response.
Auth: Public
Get the Google OAuth2 login URL.
Auth: Public
Response β 200 OK:
http://localhost:8081/oauth2/authorization/google
Get all published events ordered by date.
Auth: Public | Cache: Redis (5 min TTL, evicted on write)
Response β 200 OK:
[
{
"id": 1,
"title": "Spring Boot Hackathon",
"description": "24-hour coding marathon for Java developers",
"eventDate": "2026-12-01T09:00:00",
"location": "Pune",
"capacity": 100,
"registrationsCount": 47,
"spotsRemaining": 53,
"isFull": false,
"status": "PUBLISHED",
"venueId": 1,
"venue": {
"id": 1,
"name": "Pune Tech Park",
"city": "Pune",
"mapUrl": "https://www.google.com/maps?q=18.5911,73.7380"
},
"categoryIds": [1, 2],
"categoryNames": ["Technology", "Education"],
"createdAt": "2026-05-01T10:00:00"
}
]Get a single event by ID.
Auth: Public
Response β 200 OK: Single event object (same structure as above)
Error β 404:
{
"status": 404,
"message": "Event not found with id: 999",
"timestamp": "2026-05-24T10:30:00"
}Fuzzy search events via Elasticsearch. Tolerates typos automatically.
Auth: Public
Example: GET /api/events/search?q=hckathon β returns "Spring Boot Hackathon"
Response β 200 OK:
[
{
"id": "1",
"title": "Spring Boot Hackathon",
"description": "24-hour coding marathon",
"location": "Pune",
"eventDate": "2026-12-01T09:00:00",
"capacity": 100,
"categories": ["Technology", "Education"]
}
]Filter events by exact category name using Elasticsearch.
Auth: Public
Example: GET /api/events/search/category/Technology
Response β 200 OK: Array of EventDocument matching the category
Get upcoming published events (future dates only).
Auth: Public
Response β 200 OK: Array of events ordered by eventDate ascending
Get past published events.
Auth: Public
Response β 200 OK: Array of events ordered by eventDate descending
Create a new event.
Auth: π Required
Request:
{
"title": "Spring Boot Hackathon",
"description": "24-hour coding marathon for Java developers",
"eventDate": "2026-12-01T09:00:00",
"location": "Pune",
"capacity": 100,
"venueId": 1,
"categoryIds": [1, 2]
}Response β 201 Created:
{
"id": 1,
"title": "Spring Boot Hackathon",
"description": "24-hour coding marathon for Java developers",
"eventDate": "2026-12-01T09:00:00",
"location": "Pune",
"capacity": 100,
"registrationsCount": 0,
"spotsRemaining": 100,
"isFull": false,
"status": "PUBLISHED",
"venueId": 1,
"venue": { "id": 1, "name": "Pune Tech Park", "city": "Pune" },
"categoryIds": [1, 2],
"categoryNames": ["Technology", "Education"],
"createdAt": "2026-05-24T10:30:00"
}Error β 400 Venue capacity exceeded:
{
"status": 400,
"message": "Event capacity 200 exceeds venue capacity 100",
"timestamp": "2026-05-24T10:30:00"
}Update an existing event.
Auth: π Required
Request: Same fields as create (all optional)
Response β 200 OK: Updated event object
Delete an event.
Auth: π Required
Response β 204 No Content
Publish a draft event (DRAFT β PUBLISHED).
Auth: π Required (organizer or admin)
Response β 200 OK:
{
"id": 1,
"title": "Spring Boot Hackathon",
"status": "PUBLISHED",
"publishedAt": "2026-05-24T10:30:00"
}Error β 400 Invalid transition:
{
"status": 400,
"message": "Cannot transition event from PUBLISHED to PUBLISHED. Invalid state transition.",
"timestamp": "2026-05-24T10:30:00"
}Cancel a published event. Notifies all registered users via Kafka.
Auth: π Required (organizer or admin)
Request (optional):
{
"cancellationReason": "Venue unavailable due to unforeseen circumstances"
}Response β 200 OK:
{
"id": 1,
"status": "CANCELLED",
"cancelledAt": "2026-05-24T10:30:00",
"cancellationReason": "Venue unavailable due to unforeseen circumstances"
}Mark a published event as completed. Enables reviews.
Auth: π Required (organizer or admin)
Response β 200 OK: Event with "status": "COMPLETED"
Re-sync all MySQL events to Elasticsearch index.
Auth: Public
Response β 200 OK: "Reindexed successfully"
Get all venues.
Auth: Public
Response β 200 OK:
[
{
"id": 1,
"name": "Pune Tech Park",
"address": "Hinjewadi Phase 1",
"city": "Pune",
"state": "Maharashtra",
"pincode": "411057",
"capacity": 500,
"mapUrl": "https://www.google.com/maps?q=18.5911527,73.7380007",
"createdAt": "2026-05-01T10:00:00"
}
]Note:
latitudeandlongitudeare stored internally for location-based search but never returned in API responses.mapUrlis provided for human-friendly map access.
Get venue by ID.
Auth: Public
Filter venues by city (case-insensitive).
Auth: Public
Example: GET /api/venues/city/pune or GET /api/venues/city/Pune β same result
Find venues with capacity β₯ min.
Auth: Public
Example: GET /api/venues/capacity/200 β returns venues that hold 200+ people
Create a venue. Coordinates are auto-geocoded from address.
Auth: π Required
Request (without coordinates β auto-geocoded):
{
"name": "Koregaon Park Venue",
"address": "Koregaon Park",
"city": "Pune",
"state": "Maharashtra",
"pincode": "411001",
"capacity": 300
}Request (with manual coordinates):
{
"name": "Koregaon Park Venue",
"address": "Koregaon Park",
"city": "Pune",
"capacity": 300,
"latitude": 18.5366225,
"longitude": 73.8932738
}Response β 201 Created:
{
"id": 2,
"name": "Koregaon Park Venue",
"address": "Koregaon Park",
"city": "Pune",
"state": "Maharashtra",
"capacity": 300,
"mapUrl": "https://www.google.com/maps?q=18.5366225,73.8932738",
"createdAt": "2026-05-24T10:30:00"
}Update a venue.
Auth: π Required
Delete a venue. Sets venue_id = NULL on associated events (events are preserved).
Auth: π Required
Response β 204 No Content
Retry coordinate lookup for a venue with null coordinates.
Auth: π Required
Response β 200 OK: Updated venue with coordinates populated
Get all organizations (summary view).
Auth: Public
Response β 200 OK:
[
{
"id": 1,
"name": "Pune Java User Group",
"location": "Pune",
"followerCount": 245
}
]Get full organization details.
Auth: Public
Response β 200 OK:
{
"id": 1,
"name": "Pune Java User Group",
"description": "Monthly Java meetups and workshops in Pune",
"website": "https://pjug.in",
"location": "Pune",
"ownerId": 1,
"ownerName": "Shubham Kale",
"followerCount": 245,
"isFollowing": false,
"createdAt": "2026-01-15T10:00:00"
}
isFollowingreflects the current authenticated user's follow status. Returnsfalsefor unauthenticated requests.
Create an organization. The authenticated user becomes the owner.
Auth: π Required
Request:
{
"name": "Pune Java User Group",
"description": "Monthly Java meetups and workshops in Pune",
"website": "https://pjug.in",
"location": "Pune"
}Response β 201 Created: Full organization object
Error β 400 Duplicate:
{
"status": 400,
"message": "Organization already exists: Pune Java User Group",
"timestamp": "2026-05-24T10:30:00"
}Update organization. Owner only.
Auth: π Required (owner only)
Error β 403:
{
"status": 403,
"message": "Only the owner can update this organization",
"timestamp": "2026-05-24T10:30:00"
}Delete organization. Owner or admin only.
Auth: π Required (owner or admin)
Response β 204 No Content
Follow an organization.
Auth: π Required
Response β 200 OK: "Following organization"
Error β 400 Own organization:
{
"status": 400,
"message": "Cannot follow your own organization",
"timestamp": "2026-05-24T10:30:00"
}Unfollow an organization.
Auth: π Required
Response β 200 OK: "Unfollowed organization"
Get organizations created by the current user.
Auth: π Required
Response β 200 OK: Array of OrganizationSummaryDTO
Get organizations the current user follows, ordered by follow date.
Auth: π Required
Response β 200 OK: Array of OrganizationSummaryDTO
Get current user's profile.
Auth: π Required
Response β 200 OK:
{
"id": 1,
"name": "Shubham Kale",
"email": "shubham@example.com",
"bio": "Java backend developer from Pune",
"phone": "9876543210",
"city": "Pune",
"role": "USER",
"createdAt": "2026-01-01T10:00:00",
"updatedAt": "2026-05-24T10:30:00"
}Update profile. Email and role are read-only and cannot be changed here.
Auth: π Required
Request:
{
"name": "Shubham Kale",
"bio": "Java backend developer from Pune",
"phone": "9876543210",
"city": "Pune"
}Response β 200 OK: Updated profile object
Change password. Requires current password verification.
Auth: π Required
Request:
{
"currentPassword": "oldpassword",
"newPassword": "newpassword123",
"confirmPassword": "newpassword123"
}Response β 200 OK: "Password changed successfully"
Error β 400 Wrong current password:
{
"status": 400,
"message": "Current password is incorrect",
"timestamp": "2026-05-24T10:30:00"
}Permanently delete account.
Auth: π Required
Response β 200 OK: "Account deleted successfully"
Get all categories ordered by event count descending.
Auth: Public
Response β 200 OK:
[
{
"id": 1,
"name": "Technology",
"description": "Software, hardware, and tech events",
"icon": "laptop",
"eventCount": 47,
"createdAt": "2026-01-01T00:00:00"
},
{
"id": 2,
"name": "Education",
"description": "Workshops, seminars, and learning events",
"icon": "book",
"eventCount": 23,
"createdAt": "2026-01-01T00:00:00"
}
]10 categories are pre-seeded: Technology, Education, Business, Music, Sports, Arts, Food, Health, Social, Other
Get category by ID.
Auth: Public
Get all categories for a specific event.
Auth: Public
Create a new category. Admin only.
Auth: π ADMIN role required
Request:
{
"name": "Gaming",
"description": "Gaming tournaments and community events",
"icon": "gamepad"
}Response β 201 Created: Category object
Update a category. Admin only.
Auth: π ADMIN role required
Delete a category. Admin only.
Auth: π ADMIN role required
Response β 204 No Content
Register for an event. Uses atomic SQL to prevent overselling under concurrent load.
Auth: π Required
Response β 200 OK:
{
"id": 1,
"eventId": 1,
"eventTitle": "Spring Boot Hackathon",
"eventLocation": "Pune",
"eventDate": "2026-12-01T09:00:00",
"userId": 1,
"userName": "Shubham Kale",
"userEmail": "shubham@example.com",
"status": "CONFIRMED",
"registeredAt": "2026-05-24T10:30:00",
"cancelledAt": null
}Error β 400 Event full:
{
"status": 400,
"message": "Event is full. No spots remaining.",
"timestamp": "2026-05-24T10:30:00"
}Error β 400 Already registered:
{
"status": 400,
"message": "Already registered for this event",
"timestamp": "2026-05-24T10:30:00"
}Error β 400 Past event:
{
"status": 400,
"message": "Cannot register for a past event",
"timestamp": "2026-05-24T10:30:00"
}Cancel registration. Frees up spot atomically. Auto-promotes first waitlisted user.
Auth: π Required
Response β 200 OK: "Registration cancelled"
Get all events the current user registered for.
Auth: π Required
Response β 200 OK: Array of RegistrationDTO ordered by registration date
Get all confirmed attendees for an event. Organizer or admin only.
Auth: π Required (organizer or admin)
Response β 200 OK: Array of RegistrationDTO (CONFIRMED only)
Error β 403:
{
"status": 403,
"message": "Only the event organizer or admin can view attendees",
"timestamp": "2026-05-24T10:30:00"
}Check if current user is registered for this event.
Auth: π Required
Response β 200 OK: true or false
Get number of confirmed registrations (public).
Auth: Public
Response β 200 OK: 47 (number)
Join the waitlist for a full event.
Auth: π Required
Response β 200 OK:
{
"id": 1,
"eventId": 1,
"eventTitle": "Spring Boot Hackathon",
"userId": 3,
"userName": "Test User Three",
"position": 1,
"status": "WAITING",
"joinedAt": "2026-05-24T10:30:00"
}Error β 400 Event not full:
{
"status": 400,
"message": "Event is not full. Register directly instead.",
"timestamp": "2026-05-24T10:30:00"
}Leave the waitlist.
Auth: π Required
Response β 200 OK: "Left waitlist"
View waitlist for an event (ordered by position).
Auth: π Required
Response β 200 OK: Array of WaitlistDTO ordered by position
Get all events current user is waitlisted for.
Auth: π Required
Response β 200 OK: Array of WaitlistDTO
Submit a review. Three guards: event must be COMPLETED, user must have registered, one review per event.
Auth: π Required
Request:
{
"rating": 5,
"comment": "Excellent event! The Spring Boot sessions were incredibly insightful."
}Response β 201 Created:
{
"id": 1,
"eventId": 1,
"eventTitle": "Spring Boot Hackathon",
"userId": 1,
"userName": "Shubham Kale",
"rating": 5,
"comment": "Excellent event! The Spring Boot sessions were incredibly insightful.",
"createdAt": "2026-05-24T10:30:00",
"updatedAt": null
}Error β 400 Event not completed:
{
"status": 400,
"message": "Reviews are only allowed for completed events. Event status is: PUBLISHED",
"timestamp": "2026-05-24T10:30:00"
}Error β 400 Not registered:
{
"status": 400,
"message": "You can only review events you registered for",
"timestamp": "2026-05-24T10:30:00"
}Get all reviews for an event.
Auth: Public
Response β 200 OK: Array of ReviewDTO ordered by newest first
Get average rating and review count.
Auth: Public
Response β 200 OK:
{
"eventId": 1,
"averageRating": 4.7,
"totalReviews": 23
}Update a review. Owner only.
Auth: π Required (review owner only)
Request:
{
"rating": 4,
"comment": "Updated: Great event, minor logistics issues."
}Delete a review. Owner or admin.
Auth: π Required (review owner or admin)
Response β 204 No Content
Get all reviews submitted by current user.
Auth: π Required
Bookmark an event.
Auth: π Required
Response β 200 OK: "Event bookmarked"
Remove bookmark.
Auth: π Required
Response β 200 OK: "Bookmark removed"
Get all bookmarked events for current user.
Auth: π Required
Response β 200 OK: Array of EventDTO
Check if event is bookmarked by current user.
Auth: π Required
Response β 200 OK: true or false
Get all notifications for current user, ordered newest first.
Auth: π Required
Response β 200 OK:
[
{
"id": 1,
"type": "EVENT_CANCELLED",
"title": "Event Cancelled",
"message": "The event 'Spring Boot Hackathon' you registered for has been cancelled. Reason: Venue unavailable.",
"isRead": false,
"entityType": "EVENT",
"entityId": 1,
"createdAt": "2026-05-24T10:30:00",
"readAt": null
},
{
"id": 2,
"type": "REGISTRATION_CONFIRMED",
"title": "Registration Confirmed",
"message": "You are registered for 'Java Workshop'. See you there!",
"isRead": true,
"entityType": "EVENT",
"entityId": 2,
"createdAt": "2026-05-23T14:00:00",
"readAt": "2026-05-23T14:05:00"
}
]Notification types: EVENT_CANCELLED, EVENT_UPDATED, REGISTRATION_CONFIRMED, REGISTRATION_CANCELLED, NEW_FOLLOWER, NEW_EVENT_FROM_FOLLOWED_ORG, ROLE_CHANGED, WELCOME
Get only unread notifications.
Auth: π Required
Get unread notification count (lightweight β for badge display).
Auth: π Required
Response β 200 OK: 3 (number)
Mark a single notification as read.
Auth: π Required
Response β 200 OK: "Marked as read"
Mark all notifications as read. Uses single bulk UPDATE query.
Auth: π Required
Response β 200 OK: "All notifications marked as read"
Delete a notification.
Auth: π Required (notification owner only)
Response β 204 No Content
Get dashboard for all events owned by current user's organizations.
Auth: π Required
Response β 200 OK:
{
"totalEventsCreated": 12,
"publishedEvents": 5,
"cancelledEvents": 2,
"completedEvents": 5,
"totalRegistrations": 347,
"totalUniqueAttendees": 298,
"averageRatingAcrossEvents": 4.3,
"eventBreakdown": [
{
"eventId": 1,
"eventTitle": "Spring Boot Hackathon",
"status": "PUBLISHED",
"capacity": 100,
"confirmedRegistrations": 47,
"cancelledRegistrations": 3,
"spotsRemaining": 53,
"averageRating": 4.8,
"totalReviews": 12,
"registrationRate": 47.0
}
]
}Platform-wide statistics. Admin only.
Auth: π ADMIN role required
Response β 200 OK:
{
"totalEvents": 156,
"publishedEvents": 89,
"totalUsers": 1247,
"totalOrganizations": 34
}Detailed analytics for a specific event.
Auth: π Required (organizer or admin)
Response β 200 OK:
{
"eventId": 1,
"eventTitle": "Spring Boot Hackathon",
"status": "COMPLETED",
"capacity": 100,
"confirmedRegistrations": 94,
"cancelledRegistrations": 6,
"spotsRemaining": 0,
"averageRating": 4.7,
"totalReviews": 31,
"registrationRate": 94.0
}Download confirmed attendee list as CSV.
Auth: π Required (organizer or admin)
Response β 200 OK:
Content-Disposition: attachment; filename="Spring Boot Hackathon-attendees.csv"
Content-Type: text/csv
Name,Email,Registered At,Status
Shubham Kale,shubham@example.com,2026-05-01T10:00:00,CONFIRMED
...
Download confirmed attendee list as Excel (.xlsx).
Auth: π Required (organizer or admin)
Response β 200 OK:
Content-Disposition: attachment; filename="Spring Boot Hackathon-attendees.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Formatted Excel with bold headers and auto-sized columns.
List all registered users with roles.
Auth: π ADMIN role required
Response β 200 OK:
[
"shubham@example.com β USER",
"admin@events.com β ADMIN",
"user2@example.com β USER"
]Promote a USER to ADMIN role.
Auth: π ADMIN role required
Response β 200 OK: "shubham@example.com has been promoted to ADMIN"
Demote an ADMIN to USER role.
Auth: π ADMIN role required
Response β 200 OK: "shubham@example.com has been demoted to USER"
Get AI-powered event recommendations. Powered by Spring AI β provider-agnostic (Groq LLaMA 3, Anthropic Claude, OpenAI GPT, local Ollama).
Auth: π Required
Example: GET /api/ai/recommend?interests=backend development and Java
Response β 200 OK:
Based on your interest in backend development and Java, here are my top picks:
1. Spring Boot Hackathon (Pune Tech Park, Dec 1) β Perfect match! This 24-hour
coding marathon focuses on Java backend development, giving you hands-on
experience in a competitive environment.
2. Java Workshop (Mumbai, Nov 15) β Great for strengthening your Java
fundamentals which is the foundation of all the backend work you enjoy.
Custom health check verifying all infrastructure dependencies.
Auth: Public
Response β 200 OK (all healthy):
{
"status": "UP",
"application": "UP",
"mysql": "UP",
"redis": "UP",
"timestamp": "2026-05-24T10:30:00"
}Response β 200 OK (degraded):
{
"status": "DEGRADED",
"application": "UP",
"mysql": "UP",
"redis": "DOWN",
"redisError": "Connection refused",
"timestamp": "2026-05-24T10:30:00"
}Get application version and runtime info.
Auth: Public
Response β 200 OK:
{
"application": "Event Management System",
"version": "4.0.0",
"phase": "Phase 5 β Cloud Ready",
"java": "17.0.9",
"springBoot": "3.4.1"
}All errors follow this structure:
{
"status": 404,
"message": "Descriptive error message",
"timestamp": "2026-05-24T10:30:00"
}{
"fieldName": "Validation message",
"anotherField": "Another validation message"
}| Code | Meaning | When |
|---|---|---|
| 200 | OK | Successful GET, PUT, action endpoints |
| 201 | Created | Resource created via POST |
| 204 | No Content | Successful DELETE |
| 400 | Bad Request | Validation failed, business rule violated |
| 401 | Unauthorized | No token, invalid/expired token |
| 403 | Forbidden | Authenticated but insufficient permissions |
| 404 | Not Found | Resource does not exist |
| 429 | Too Many Requests | Rate limit exceeded (20 req/IP) |
| 500 | Internal Server Error | Unexpected server error |
All endpoints are rate-limited to 20 requests per IP. Tokens refill at 10/second.
429 Response:
{
"status": 429,
"message": "Too many requests. Slow down."
}| Topic | Producer | Consumer | Payload |
|---|---|---|---|
event.cancelled |
Main App | Email Service | EventCancelledMessage |
event.registered |
Main App | Email Service | EventRegisteredMessage |
email.requested |
Main App | Email Service | Generic email request |
Interactive documentation with executable requests:
http://localhost:8081/swagger-ui/index.html
Click Authorize β paste JWT token β all protected endpoints execute from browser.
Raw OpenAPI spec: http://localhost:8081/api-docs
Event Management System β Production Ready | Built by Shubham Kale