Introduction
The HR Management API provides endpoints for managing employees, tasks, and human resources operations.
Authentication
POST
/auth/login
Authenticate user and receive access token
Request Body:
{
"username": "string",
"password": "string"
}
POST
/add/admin
Create new admin account
Request Body:
{
"username": "string",
"password": "string",
"email": "string",
"role": "string"
}
Employees
GET
/emp
Get all employees
POST
/add_employe
Create new employee
Request Body:
{
"username": "string",
"password": "string",
"nom": "string",
"prenom": "string",
"email": "string",
"telephone": "string",
"adresse": "string",
"departement": "string",
"poste": "string",
"date_embauche": "string",
"status": "string"
}
PUT
/update/employe/{employe_username}
Update employee information
Request Body:
{
"username": "string",
"password": "string",
"nom": "string",
"prenom": "string",
"email": "string",
"telephone": "string",
"adresse": "string",
"departement": "string",
"poste": "string",
"date_embauche": "string",
"status": "string"
}
POST
/employee/profile
Get employee profile
Request Body:
{
"username": "string"
}
Tasks
GET
/TACHE
Get all tasks
GET
/employee/tasks
Get tasks for specific employee
Query Parameters:
{
"username": "string"
}
PUT
/employee/tasks/{task_id}
Update task status
Request Body:
{
"new_status": "string"
}
GET
/EMPLOYE-TACHE
Get all employee-task assignments
History
GET
/HISTORIQUE
Get complete history records
GET
/employee/check-history
Get history for specific employee
Query Parameters:
{
"username": "string"
}
HR Management
GET
/RH
Get all HR personnel
POST
/add_RH
Add new HR personnel
Request Body:
{
"username": "string",
"password": "string",
"nom": "string",
"prenom": "string",
"email": "string",
"telephone": "string",
"departement": "string",
"role": "string"
}
Leave & Absence
GET
/CONGE
Get all leave requests
GET
/ABSCENCE
Get all absence records