/notes-backend

Backend for notes web-app using Django and Django-REST-Framework

Primary LanguagePythonMIT LicenseMIT

Note-Web-App Backend API

A backend for Notes-Web-App using Django and Django-REST-Framework

Installation

  1. To build the container run
  docker-compose build
  1. To create migration files
  docker-compose run --rm backend sh -c "python3 manage.py makemigrations"
  1. To migrate the db models
  docker-compose run --rm backend sh -c "python3 manage.py migrate"
  1. To run the application locally
  docker-compose up

API Reference

Create/Register

  POST /api/user/create
Parameter Type Description
email string Required. Your email
password string Required. Your password
name string Required. Your name

Authenticate User

  POST /api/user/token
Parameter Type Description
email string Required. Your email
password string Required. Your password

Get Notes List

  GET /api/note/get

Headers -> Authorization: Token

Create New Note

  POST /api/note/create

Headers -> Authorization: Token

Parameter Type Description
title string Required. Note Title
body string Required. Note Body
user string Required. User ID

Get Details of Specific Note

  GET /api/note/get/<str:pk>

Headers -> Authorization: Token

Update Note

  PUT /api/note/update/<str:pk>

Headers -> Authorization: Token

Parameter Type Description
title string Required. Note Title
body string Required. Note Body
user string Required. User ID

Delete Note

  DELETE /api/note/delete/<str:pk>

Headers -> Authorization: Token