Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hariharan1893/event-management-api
Simple SpringBoot RestApi for Event Management Crud Operations
https://github.com/hariharan1893/event-management-api
h2-database java maven springboot3
Last synced: 5 days ago
JSON representation
Simple SpringBoot RestApi for Event Management Crud Operations
- Host: GitHub
- URL: https://github.com/hariharan1893/event-management-api
- Owner: Hariharan1893
- Created: 2024-09-29T07:05:19.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-10-16T09:46:49.000Z (22 days ago)
- Last Synced: 2024-11-02T01:07:34.536Z (5 days ago)
- Topics: h2-database, java, maven, springboot3
- Language: Java
- Homepage:
- Size: 11.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Event Management API
This is a Spring Boot application that provides APIs to manage events, venues, categories, and event attendees.
## Features
- Manage categories of events.
- Manage venues where events are hosted.
- Manage events and their details.
- Manage attendees for events.## API Endpoints
### Home Page API
- **GET** `/home`
Retrieves the home page.---
### Category API
- **GET** `/api/category/allcategory`
Retrieves all categories.- **GET** `/api/category/getcategory/{id}`
Retrieves a specific category by its ID.- **POST** `/api/category/createcategory`
Creates a new category.
**Request Body (example):**
```json
{
"category_name": ""
}
```- **DELETE** `/api/category/deletecategory/{id}`
Deletes a category by its ID.---
### Venue API
- **GET** `/api/venue/getallvenue`
Retrieves all venues.- **GET** `/api/venue/getvenue/{id}`
Retrieves a specific venue by its ID.- **POST** `/api/venue/createvenue`
Creates a new venue.
**Request Body (example):**
```json
{
"name": "",
"location": ""
}
```- **DELETE** `/api/venue/deletevenue/{id}`
Deletes a venue by its ID.---
### Events API
- **GET** `/api/events/getallevent`
Retrieves all events.- **GET** `/api/events/getevent/{id}`
Retrieves a specific event by its ID.- **POST** `/api/events/addevent`
Creates a new event.
**Request Body (example):**
```json
{
"eventTitle": "",
"dateTime": "",
"venue": {
"venue_id": 1
},
"category": {
"category_id": 1
}
}
```- **PUT** `/api/events/updateevent/{id}`
Updates an existing event by its ID.- **DELETE** `/api/events/deleteevent/{id}`
Deletes an event by its ID.---
### Event-Attendee API
- **GET** `/api/attendees/getallattendees`
Retrieves all event attendees.- **GET** `/api/attendees/getattendee/{id}`
Retrieves a specific attendee by their ID.- **POST** `/api/attendees/addattendee/{eventId}`
Adds a new attendee to an event.
**Request Body (example):**
```json
{
"name": "",
"email": ""
}
```- **DELETE** `/api/attendees/deleteattendee/{id}`
Deletes an attendee by their ID.---
## How to Run the Project
1. Clone the repository:
```bash
git clone
```
2. Navigate to the project directory:
```bash
cd
```
3. Build the project using Maven:
```bash
mvn clean install
```
4. Run the application:
```bash
mvn spring-boot:run
```
5. The application will be running at:
`http://localhost:8080`---
## Testing the API using Postman
1. **Home Page API Call:**
- **Method**: GET
- **URL**: `localhost:8080/home`
- **Expected Response**:
```json
{
"message": "Welcome to the Home Page"
}
```2. **Category API Calls**:
- **Get All Categories**
**Method**: GET
**URL**: `localhost:8080/api/category/allcategory`- **Get Category by ID**
**Method**: GET
**URL**: `localhost:8080/api/category/getcategory/1`- **Create Category**
**Method**: POST
**URL**: `localhost:8080/api/category/createcategory`
**Body (JSON)**:
```json
{
"category_name": ""
}
```- **Delete Category**
**Method**: DELETE
**URL**: `localhost:8080/api/category/deletecategory/1`3. **Venue API Calls**:
- **Get All Venues**
**Method**: GET
**URL**: `localhost:8080/api/venue/getallvenue`- **Get Venue by ID**
**Method**: GET
**URL**: `localhost:8080/api/venue/getvenue/1`- **Create Venue**
**Method**: POST
**URL**: `localhost:8080/api/venue/createvenue`
**Body (JSON)**:
```json
{
"name": "",
"location": ""
}
```- **Delete Venue**
**Method**: DELETE
**URL**: `localhost:8080/api/venue/deletevenue/1`4. **Event API Calls**:
- **Get All Events**
**Method**: GET
**URL**: `localhost:8080/api/events/getallevent`- **Get Event by ID**
**Method**: GET
**URL**: `localhost:8080/api/events/getevent/1`- **Create Event**
**Method**: POST
**URL**: `localhost:8080/api/events/addevent`
**Body (JSON)**:
```json
{
"eventTitle": "",
"dateTime": "",
"venue": {
"venue_id": 1
},
"category": {
"category_id": 1
}
}
```- **Update Event**
**Method**: PUT
**URL**: `localhost:8080/api/events/updateevent/1`
**Body (JSON)**:
```json
{
"eventTitle": "",
"dateTime": ""
}
```- **Delete Event**
**Method**: DELETE
**URL**: `localhost:8080/api/events/deleteevent/1`5. **Event-Attendee API Calls**:
- **Get All Attendees**
**Method**: GET
**URL**: `localhost:8080/api/attendees/getallattendees`- **Get Attendee by ID**
**Method**: GET
**URL**: `localhost:8080/api/attendees/getattendee/1`- **Add Attendee to an Event**
**Method**: POST
**URL**: `localhost:8080/api/attendees/addattendee/1`
**Body (JSON)**:
```json
{
"name": "",
"email": ""
}
```- **Delete Attendee**
**Method**: DELETE
**URL**: `localhost:8080/api/attendees/deleteattendee/1`---
## Tools and Technologies
- **Spring Boot**
- **Maven**
- **Postman** (for API testing)---
Let me know if you need more adjustments or additional sections!