Task Management API with Django &
DRF
A RESTful Task Management API built using Django Rest Framework. This application
allows users to:
- Create tasks
- Assign tasks to one or multiple users
- Retrieve tasks assigned to specific users
**Requirements**
- Python 3.8
- Django 3.2
- Django Rest Framework (DRF)
- SQLite (default)
- Pip and Virtual Environment
1st create folder in which you want to setup project
2nd django-admin startproject <project_name> ie ->TaskMap
3rd cd TaskMap
4th python [Link] startapp TaskMapi
5th Configure the App in [Link]
API Endpoints
Task Endpoints
Method Endpoint Description
POST /api/TaskMapi/create/ Create a new task
POST /api/TaskMapi/assign/ Assign task(s) to
user(s)
GET /api/TaskMapi/user/ Get tasks assigned to
<int:user_id>/ a user
API Requests and Response:
[Link] /api/TaskMapi/create/
[Link] /api/TaskMapi/assign/
Request in json format:
{
"task_id": 1,
"user_ids": [1, 2]
}
Response for the same is:
{
"message": "Task assigned successfully"
}
[Link] /api/TaskMapi/user/1/
Response is:
[
{
"id": 1,
"name": "Test Task",
"description": "This is a test task",
"status": "Pending",
"created_at": "2025-03-26T[Link].824326Z"
}
]
Thank you and I look forward to your response!