# Task Manager API Documentation
## Base URL
https://documenter.getpostman.com/view/40516603/2sB2qfAKRw
---
## Endpoints
### 1. Get All Tasks
- **URL:** `/`
- **Method:** GET
- **Description:** Retrieves a list of all tasks.
- **Response:**
```json
[
{
"id": 1,
"title": "Task title",
"description": "Task description",
"status": "todo",
"due_date": "2025-06-01T12:00:00Z",
"task_id": "TASK123"
}
]
-
Status Codes:
- 200 OK
- URL:
/{task_id}/
- Method: GET
- Description: Retrieves details of a specific task by its
task_id
. - URL Params:
task_id
— string (required) - Response:
{
"id": 1,
"title": "Task title",
"description": "Task description",
"status": "todo",
"due_date": "2025-06-01T12:00:00Z",
"task_id": "TASK123"
}
-
Status Codes:
- 200 OK
- 404 Not Found — if task with given
task_id
does not exist
- URL:
/
- Method: POST
- Description: Creates a new task.
- Request Body:
{
"title": "Task title",
"description": "Task description",
"status": "todo",
"due_date": "2025-06-01T12:00:00Z"
}
- Response:
{
"id": 2,
"title": "Task title",
"description": "Task description",
"status": "todo",
"due_date": "2025-06-01T12:00:00Z",
"task_id": "TASK124"
}
-
Status Codes:
- 201 Created
- 400 Bad Request — if validation fails
- URL:
/{task_id}/
- Method: PUT
- Description: Updates details of an existing task.
- URL Params:
task_id
— string (required) - Request Body:
{
"title": "Updated task title",
"description": "Updated description",
"status": "in_progress",
"due_date": "2025-07-01T12:00:00Z"
}
- Response:
{
"id": 1,
"title": "Updated task title",
"description": "Updated description",
"status": "in_progress",
"due_date": "2025-07-01T12:00:00Z",
"task_id": "TASK123"
}
-
Status Codes:
- 200 OK
- 400 Bad Request — if validation fails
- 404 Not Found — if task with given
task_id
does not exist
-
URL:
/{task_id}/
-
Method: DELETE
-
Description: Deletes a task by
task_id
. -
URL Params:
task_id
— string (required) -
Response: No content
-
Status Codes:
- 204 No Content
- 404 Not Found — if task with given
task_id
does not exist
- Python 3.8+
- Node.js and npm
- PostgreSQL or SQLite (for development)
- Git
- Clone the repository:
git clone https://github.com/yourusername/task-manager.git
cd task-manager/backend
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
- Install Python dependencies:
pip install -r requirements.txt
-
Configure your database settings in
settings.py
(default uses SQLite). -
Run migrations:
python manage.py migrate
- (Optional) Create a superuser:
python manage.py createsuperuser
- Run the backend server:
python manage.py runserver
- Navigate to the frontend directory:
cd ../frontend
- Install dependencies:
npm install
- Start the frontend development server:
npm start
- Access the React app at http://localhost:3000
- Use the React frontend to manage tasks (create, update, delete, search).
- The backend API runs at
http://localhost:8000/api/tasks/
. - API can also be tested using Postman or other REST clients.
- Backend tests:
python manage.py test
- Frontend tests (if configured):
npm test
- Make sure the backend server is running before the frontend to avoid connection issues.
- All API requests validate fields like
title
,status
,due_date
, andtask_id
. - Customize environment variables or config files as needed.