0% found this document useful (0 votes)
29 views3 pages

Task Management API With Django & DRF

The document outlines the creation of a RESTful Task Management API using Django Rest Framework, allowing users to create and assign tasks. It includes setup instructions, requirements, and details about API endpoints for task creation, assignment, and retrieval. Sample requests and responses for the API are also provided.

Uploaded by

Adarsh Tripathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

Task Management API With Django & DRF

The document outlines the creation of a RESTful Task Management API using Django Rest Framework, allowing users to create and assign tasks. It includes setup instructions, requirements, and details about API endpoints for task creation, assignment, and retrieval. Sample requests and responses for the API are also provided.

Uploaded by

Adarsh Tripathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

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!

You might also like