Successfully completing an exercise will greatly increase your chances of landing a position with us.

To-Do List API

Objective: Build a RESTful API for a To-Do List application that allows clients to perform CRUD operations on tasks. The API should be secure, follow best practices, and use a database to store tasks persistently.

Requirements:

  • Endpoints:
    • Create an endpoint to add a new task. Each task should include a title and a timestamp.
    • Create an endpoint to fetch all tasks in the database.
    • Create an endpoint to fetch a single task by its ID.
    • Create an endpoint to update a task (e.g., mark it as completed).
    • Create an endpoint to delete a task by its ID.
  • Data Validation:
    • Validate incoming data for required fields (e.g., title).
    • Return appropriate error messages for invalid input or missing data.
  • Database:
    • Use a relational database (e.g., MySQL, PostgreSQL) or a NoSQL database (e.g., MongoDB) to store tasks persistently.
  • Data Model:
    • Each task should have a unique ID, title, timestamp, and a status field (e.g., "Pending" or "Completed").
  • Security:
    • Implement basic authentication (e.g., API key or token-based authentication).

Stretch Goals (Optional):

  • Paginate the list of tasks when fetching all tasks.
  • Add search and filter functionality (e.g., filter by status or search by title).
  • Implement rate limiting for the API.
  • Deploy the API to a cloud service (e.g., AWS, Heroku).
  • Write unit and integration tests for key functionality.

Once you've completed the exercise, please fill out the form below.

Create a Public Github Repository and upload your solution there.

Please add a README file to your repository with instructions and requirements to run your exercise.

Also, add a detailed explanation of your solution in your README file.