Skip to content

MasoudMusa/AgriSense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Agri Sense

A tech-based solution that provides farmers with insights and data to make informed decisions about their crops.

Documentation

Documentation

API Reference

Get all user deatils(superuser)

GET http://localhost:8000/api/users/ HTTP/1.1
Content-Type: application/json
Authorization: Token <token>

Change details of current authenticated user

PUT http://localhost:8000/api/user/update/ HTTP/1.1
Content-Type: application/json
Authorization: Token <token>

{
    "email": "user@email.com",
    "first_name": "First Name",
    "last_name": "Last Name"
}

Register user qith email, password, first and last names

POST http://localhost:8000/api/auth/register/ HTTP/1.1
content-type: application/json

{
    "email": "user@email.com",
    "password": "biddweuiuaUI",
    "first_name": "First Name",
    "last_name": "Last Name"
}

Login user with email and password

POST http://localhost:8000/api/auth/login/ HTTP/1.1
content-type: application/json

{
    "email": "user@email.com",
    "password": "biddweuiuaUI"
}

Change password for authenticated user

POST http://localhost:8000/api/auth/user/change-password/ HTTP/1.1
content-type: application/json
Authorization: Token <token>

{    
    "old_password": "biddweuiuaUI",
    "new_password": "biddweuiuaUI123"
}

Get user details by ID(superuser)

GET http://localhost:8000/api/user/3/ HTTP/1.1
content-type: application/json
Authorization: Token <token>

Log out authenticated user

POST http://localhost:8000/api/auth/logout/ HTTP/1.1
content-type: application/json

{"token":<token>}

Get current user details

GET http://localhost:8000/api/user/ HTTP/1.1
Content-Type: application/json
Authorization: Token <token>	

Get all user deatils(superuser)

GET http://localhost:8000/api/users/ HTTP/1.1
Content-Type: application/json
Authorization: Token <token>	

Change details of current authenticated user

PUT http://localhost:8000/api/user/update/ HTTP/1.1
Content-Type: application/json
Authorization: Token <token>f

{
    "email": "user@email.com",
    "first_name": "First Name",
    "last_name": "Last Name"
}

Hi, I'm Mwenda! 👋

🔗 Links

portfolio linkedin twitter

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages