This is a Task Management API built using Django and Django REST Framework (DRF). The API allows users to create tasks, assign tasks to users, and retrieve assigned tasks.
- User authentication using JWT (JSON Web Token).
- Create, update, and delete tasks.
- Assign tasks to multiple users.
- Retrieve tasks assigned to a specific user.
git clone https://github.com/AbHIsHEK4011/Django-Task-Management.git
cd task_managementpython -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activatepip install -r requirements.txtpython manage.py migratepython manage.py createsuperuserEnter username, email, and password when prompted.
python manage.py runserverServer will start at: http://127.0.0.1:8000/
- Endpoint:
POST /api/token/ - Request Body:
{ "username": "admin", "password": "adminpassword" } - Response:
{ "access": "your-access-token", "refresh": "your-refresh-token" }
Add the following header to authenticate:
{
"Authorization": "Bearer your-access-token"
}- Endpoint:
POST /api/token/refresh/ - Request Body:
{ "refresh": "your-refresh-token" }
- Endpoint:
POST /api/tasks/ - Headers:
{ "Authorization": "Bearer your-access-token", "Content-Type": "application/json" } - Request Body:
{ "name": "Fix Bug in App", "description": "Resolve issue in authentication module", "task_type": "Bug Fix", "status": "pending" }
- Endpoint:
POST /api/assign_task/ - Request Body:
{ "task_id": 1, "user_ids": [2, 3] }
- Endpoint:
GET /api/users/{user_id}/tasks/
- Endpoint:
PATCH /api/tasks/{task_id}/ - Request Body:
{ "status": "completed" }
- Endpoint:
DELETE /api/tasks/{task_id}/
If you have any questions, feel free to open an issue in the repository!