- Run
cd backend
to move to the backend directory - Make sure python is installed by running
python3 -V
- [Switch to a virtual env if you want] (optional, recommended)
- Run
pip install -r requirements.txt
to install all the dependencies - Run
python manage.py migrate
to apply the models to database - Finally, run
python manage.py runserver
to start the server
- Create a simple login view
POST /api/login
- Include
username
andpassword
in the body field
- Create a single user sign up view
POST /signup
- Include
username
andpassword
in the body field
- Create a new note
POST /notes/create
- Include
title
andcontent
in the body field - Include
Authorization: Token <your-token>
in the Header field
- Retrieve a specific note by its ID
GET /notes/{id}
- Include
Authorization: Token <your-token>
in the Header field
- Share the note with other users.
POST /notes/share
- Include
note_id
andusernames
in the body field - For multiples usernames, add multiple usernames key value pairs in the body
- Include
Authorization: Token <your-token>
in the Header field
- Update an existing note.
PUT /notes/{id}
- Include
content
in the body field
- GET all the changes associated with the note.
GET /notes/version-history/{id}
- Include
Authorization: Token <your-token>
in the Header field