API
Employee APIs
POST /employees
– Create new employee (with optional address and department)GET /employees/{id}
– Get employee by IDPUT /employees/{id}
– Update employee detailsDELETE /employees/{id}
– Delete employeeGET /employees?name=John&department=HR&page=0&size=10&sortBy=hireDate
– Get paginated, sorted list of employees with optional filters (name, department, salary range, etc.)GET /employees/by-department/{deptId}
– Get employees by departmentGET /employees/{id}/projects
– Get all projects assigned to an employeeGET /employees/{id}/salaries
– Get all salaries for an employeeGET /employees/search
– Advanced search using specifications (name, date range, department, etc.)
Controller
Department APIs
POST /departments
– Create a new departmentGET /departments
– List all departmentsGET /departments/{id}
– Get department detailsPUT /departments/{id}
– Update departmentDELETE /departments/{id}
– Delete department
Address APIs (optional if tightly coupled to employee)
POST /addresses
– Add addressPUT /addresses/{id}
– Update addressGET /addresses/{id}
– Get address details
Project APIs
POST /projects
– Create new projectGET /projects?client=Google&budgetMin=100000
– List all projects with filterGET /projects/{id}
– Get project by IDPUT /projects/{id}
– Update project detailsDELETE /projects/{id}
– Delete project
Relationship APIs
POST /employees/{empId}/assign-project/{projId}
– Assign a project to an employeeDELETE /employees/{empId}/remove-project/{projId}
– Remove project assignment
Salary APIs
POST /salaries
– Add new salary record for employeeGET /salaries/employee/{empId}
– Get all salaries for an employeeGET /salaries?month=2024-02&status=PAID&employeeId=4
– Get salaries with pagination, filters (month/year/status/employeeId)PUT /salaries/{id}
– Update salaryDELETE /salaries/{id}
– Delete salary
Payment History APIs
POST /payments
– Add new payment history entryGET /payments/salary/{salaryId}
– Get all payments for a salaryGET /payments
– Paginated list with filters (date range, payment mode, etc.)
Dashboard & Reports (Optional but Common in Portals)
GET /dashboard/summary
– Show employee counts, department-wise summary, salary spend etc.GET /reports/salary-summary?year=2024
– Salary paid per employee/monthGET /reports/department-overview
– Number of employees, active projects, total salary expense per department
Last updated
Was this helpful?