Hello 🟥NFactorial🟥!

About the project

At this project i used clean NodeJS) This is good experience for me to write back-end!


🌐 Live API Documentation: Live Documentation

The site can take a long time to load, so you need to wait

👉 Here is main URL for requests: https://todolist-nodejs-backend.onrender.com/*REQUEST*


Table of Contents

Created with:

» NodeJS
» Express
» SwaggerUI

API Endpoints

1. Get List of Todo Lists

  • Method: GET
  • URL: /todolists
  • Description: Retrieves a list of all created Todo lists.

2. Create a New Todo List

  • Method: POST
  • URL: /todolists
  • Description: Creates a new Todo list with the specified title.
  • Request Body:
    {
      "title": "My New Todo List"
    }

3. Get List of Tasks in a Todo List

  • Method: GET
  • URL: /todolists/{todolist_id}/tasks
  • Description: Retrieves a list of tasks in the specified Todo list.

4. Create a New Task

  • Method: POST
  • URL: /tasks
  • Description: Creates a new task in the specified Todo list.
  • Request Body:
    {
      "todolist_id": "your-todolist-id",
      "title": "New Task"
    }

5. Update Todo List Title

  • Method: PUT
  • URL: /todolists/{todolist_id}
  • Description: Updates the title of the specified Todo list.
  • Request Body:
    {
      "title": "Updated Todo List Title"
    }

6. Delete Todo List

  • Method: DELETE
  • URL: /todolists/{todolist_id}
  • Description: Deletes the specified Todo list along with all its tasks.

7. Update Task Title

  • Method: PUT
  • URL: /tasks/{todolist_id}
  • Description: Updates the title of the specified task in the specified Todo list.
  • Request Body:
    {
      "id": "task-id",
      "title": "Updated Task Title"
    }

8. Delete Task

  • Method: DELETE
  • URL: /tasks/{todolist_id}
  • Description: Deletes the specified task from the specified Todo list.
  • Request Body:
    {
      "task_id": "task-id"
    }

9. Update Task Status

  • Method: PUT
  • URL: /tasks/{todolist_id}/status
  • Description: Updates the status of the specified task in the specified Todo list.
  • Request Body:
    {
      "task_id": "task-id",
      "status": true
    }

Examples

For example:

https://todolist-nodejs-backend.onrender.com/api/todolists