Projects API
Endpoints for project resource allocation and time tracking.
Get Project Time Statistics
Returns approved vs pending hours, employee breakdown, and monthly breakdown for a project.
GET /projects/{id}/time-stats
Response: 200 OK
{
"project": {
"id": 3,
"name": "Mobile App Development",
"status": "Active"
},
"summary": {
"total_approved_hours": 240,
"total_pending_hours": 32,
"total_hours": 272,
"employee_count": 5
},
"employee_breakdown": [],
"monthly_breakdown": []
}
Add Employee to Project
Assigns an employee to a project.
POST /projects/{id}/employees
Request Body:
{
"employee_id": 8
}
Response: 200 OK
Remove Employee from Project
DELETE /projects/{id}/employees/{employeeId}
Response: 200 OK
Get Available Employees for Project
Returns the list of employees not yet assigned to the specified project.
GET /projects/{id}/available-employees
Response: 200 OK with the list of unassigned employees.