- Spring Boot
- PostgreSQL
-
Clone the repository:
git clone https://github.com/RickyParte/Employee-Backend.git
-
Create a database using pgAdmin or DBeaver with the name
employee
. -
Update the database configuration in the application.properties file:
spring.datasource.url=jdbc:postgresql://localhost:5432/employee?currentSchema=employee spring.datasource.username=postgres spring.datasource.password=admin
-
Run the project and check if it is working fine.
-
Access the deployed server at deployed_link.
-
Test APIs using Postman or Swagger.
-
Extract the folder and open it in your favorite IDE.
-
Create a database using pgAdmin or DBeaver with the name
employee
. -
Update the database configuration in the application.properties file as mentioned above.
-
Run the project and check if it is working fine.
- Endpoint: POST /api/employee/add-employee
- Request URL: localhost:8080/api/employee/add-employee
- Request Body:
{ "employeeName": "Ricky Parte Email", "phoneNumber": "892500075", "email": "rickydipakparte20243@gmail.com", "reportsTo": "c971cfd3-fa8a-4c58-93c7-1c93f5916e34", "profileImage": "null" }
- Response:
- CURL
curl --location 'localhost:8080/api/employee/add-employee' \ --header 'Content-Type: application/json' \ --data-raw '{ "employeeName": "Ricky Parte Email", "phoneNumber": "892500075", "email": "rickydipakparte20243@gmail.com", "reportsTo": "c971cfd3-fa8a-4c58-93c7-1c93f5916e34", "profileImage": "null" }'
- Endpoint: GET /api/employee/get-employees
- Request URL: localhost:8080/api/employee/get-employees
- Response:
-
- CURL
curl --location 'localhost:8080/api/employee/get-employees'
- Endpoint: POST /api/employee/delete-employee-by-id
- Request URL: localhost:8080/api/employee/delete-employee-by-id
- Request Header:
employeeId
-> value of employeeId - Response:
- CURL
curl --location --request POST 'localhost:8080/api/employee/delete-employee-by-id' \ --header 'employeeId: 9bafd606-732e-4076-8c34-c5e5e632b07f'
- Endpoint: POST /api/employee/update-employee/{employeeId}
- Request URL: localhost:8080/api/employee/update-employee/{employeeId}
- Request Body:
{ "employeeName": "Ricky Parte Work", "phoneNumber": "4568536948", "email": "fs19if043@gmail.com", "reportsTo": "null", "profileImage": "null" }
- Response:
- CURL
curl --location 'localhost:8080/api/employee/update-employee/f9be16f7-00f3-48f9-b255-b867193cac23' \ --header 'Content-Type: application/json' \ --data-raw '{ "employeeName": "Ricky Parte Work", "phoneNumber": "4568536948", "email": "fs19if043@gmail.com", "reportsTo": "null", "profileImage": "null" }'
- Endpoint: POST /api/employee/get-nth-manager
- Request URL: localhost:8080/api/employee/get-nth-manager
- Request Header:
employeeId
-> value of employeeIdmanagerLevel
-> value of level
- Response:
- CURL
curl --location --request POST 'localhost:8080/api/employee/get-nth-manager' \ --header 'employeeId: c971cfd3-fa8a-4c58-93c7-1c93f5916e34' \ --header 'managerLevel: 4' \ --data ''
- Endpoint: GET /api/employee/get-all-employees
- Request URL: localhost:8080/api/employee/get-all-employees?page=0&size=5&sort=employeeName
- Request Param: page=0&size=5&sort=employeeName
- Response:
- CURL
curl --location 'localhost:8080/api/employee/get-all-employees?page=0&size=5&sort=employeeName'
# ALL TASK ARE DONE PLEASE REVIEW IT
# IF ANY THING REQURED PLEASE MAIL ON rickydipakparte@gmail.com