A phonebook API written in Django REST framework.
Steps to run the API
pip3 install requirements.txt
python3 manage.py runserver
Route: http://localhost:8000/account/register
Request Type: POST
Data:
{
"name":"LuC",
"password":"123abc",
"phone_number":"77778787887",
"email":"[email protected]",
}
Route: http://localhost:8000/account/login/
Request Type: POST
Data:
{
"username":"LuC",
"password":"123abc"
}
You will receive a JWT Auth Token after signUp and signIn. Include the JWT token in headers as a Bearer Token for all private requests
Authorization: token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhbmt1ciJ9.eQicFQy2nYric9Gl2mhqOH4l8An7B_Kf2CKoJmZrPcA
Public Route: http://localhost:8000/account/contacts/
Request Type: GET
Private Route: http://localhost:8000/account/spams/
Request Type: POST
Data:
{
"phone": "9773661768"
}
Private Route: http://localhost:8000/account/search_by_name?name=Chhaya
Request Type: GET
or
Private Route: http://localhost:8000/account/search_by_name/
Data:
{
"name":"Chhaya"
}
Request type: GET
Private Route: http://localhost:8000/account/search_by_phone_number?phone_number=8510978234
Request Type: GET
or
Private Route: http://localhost:8000/account/search_by_phone_number/
Data:
{
"phone_number"=8510978234
}
Request Type: GET
FIND THE SCREENSHOTS OF THE API CALLS IN THE POSTMAN SCREENSHOTS FOLDER