The Task Management API is a RESTful API built using Node.js and Express. It provides endpoints for creating, reading, updating, and deleting tasks. Each task has a title, description, status, and due date, and the data is exchanged in JSON format.
- Clone the repository:
git clone https://github.com/your-username/task-management-api.git
- Install dependencies:
cd task-management-api
npm install
- Start the server:
npm start
The API will be running on http://localhost:3000.
Endpoint: POST /tasks
Request Body:
{
"title": "Finish project proposal",
"description": "Write up the project proposal and send it to the client",
"status": "To Do",
"dueDate": "2023-05-15"
}Response:
{
"id": "1",
"title": "Finish project proposal",
"description": "Write up the project proposal and send it to the client",
"status": "To Do",
"dueDate": "2023-05-15"
}Endpoint: GET /tasks
Response:
[
{
"id": "1",
"title": "Finish project proposal",
"description": "Write up the project proposal and send it to the client",
"status": "To Do",
"dueDate": "2023-05-15"
},
{
"id": "2",
"title": "Implement task search",
"description": "Add a search feature to the tasks page",
"status": "In Progress",
"dueDate": "2023-04-30"
}
]Endpoint: GET /tasks/{id}
Response:
{
"id": "1",
"title": "Finish project proposal",
"description": "Write up the project proposal and send it to the client",
"status": "To Do",
"dueDate": "2023-05-15"
}Endpoint: PUT /tasks/{id}
Request Body:
{
"title": "Finish project proposal",
"description": "Write up the project proposal and send it to the client",
"status": "In Progress",
"dueDate": "2023-05-15"
}Response:
{
"id": "1",
"title": "Finish project proposal",
"description": "Write up the project proposal and send it to the client",
"status": "In Progress",
"dueDate": "2023-05-15"
}Endpoint: DELETE /tasks/{id}
Response: No content
- To create a new task, send a
POSTrequest to/taskswith the task details in the request body. - To view all tasks, send a
GETrequest to/tasks. - To view a specific task, send a
GETrequest to/tasks/{id}. - To update a task, send a
PUTrequest to/tasks/{id}with the updated task details in the request body. - To delete a task, send a
DELETErequest to/tasks/{id}.
For detailed API documentation, please refer to the Postman collection.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your forked repository.
- Submit a pull request to the main repository.
This project is licensed under the MIT License.