The "Simple TODO List API" challenge is designed to build a RESTful API that allows users to manage a list of tasks.
- Set up a web server capable of handling API requests.
- Implement endpoints for creating, reading, updating, and deleting tasks.
- Store tasks persistently (e.g., in-memory, database).
- Understand HTTP methods (GET, POST, PUT, DELETE) and status codes.
-
Objective: Develop a RESTful API that manages a TODO list of tasks.
-
Environment Setup: Our goal is to implement this task using JavaScript/TypeScript, but if you feel more comfortable with another language and framework, feel free to use it. What matters to us is solving the problem and how you approach the solution.
-
Implementation Details:
- Define endpoints (
/tasks) for handling CRUD operations:GET /tasks: Retrieve all tasks.POST /tasks: Create a new task.GET /tasks/{id}: Retrieve a specific task by ID.PUT /tasks/{id}: Update an existing task.DELETE /tasks/{id}: Delete a task by ID.
- Implement logic to interact with task data (e.g., store tasks in memory, use a database).
- Return task data as JSON in responses.
- Define endpoints (
-
Testing: Test your API using a HTTP client (e.g., Postman, curl).
- Send requests to each endpoint (
/tasks) with appropriate data payloads (e.g., JSON for creating/updating tasks). - Verify that the responses contain the expected task data and that status codes are appropriate (e.g., 200 OK, 404 Not Found).
- Send requests to each endpoint (
- Pagination: Implement pagination for
GET /tasksendpoint to handle large datasets. - Error Handling: Enhance error messages and responses for better user experience.
- Sorting and Filtering: Add capabilities to sort and filter tasks based on different criteria (e.g., due date, status).
After completing this task, please create a new repository and deploy your project on your own GitHub account. Then, share the project link with us via email. If you have any questions, feel free to reach out at alireza.paziresh@aisa.solutions
Happy coding!