Setup Virtual Environment
python3 -m venv env
Activate Virtual Environment
source env/bin/activate
Install the required packages by running the following command:
pip3 install -r requirements.txt
Create an .env file in base directory using the following sample env and set the SECRET_KEY:
cp .env.sample .env
Run server using the following command
python3 manage.py runserver
Get list of all devices
GET http://localhost:8000/api/v1/devices
Update connection status of a device to on
PATCH http://localhost:8000/api/v1/devices/:device_id
-d connect_status=true
Update connection status of a device to off
PATCH http://localhost:8000/api/v1/devices/:device_id
-d connect_status=false