RESTful API for LXC
Use it with Dashboard
git clone --recursive https://github.com/lxc-webpanel/lxc-rest.git
apt install python3-lxc
cd lxc-rest
pip install -r requirements.txt
python3 install/setup.py
python3 run.py
gunicorn --bind :5000 app:app
uwsgi --socket :5000 --protocol=http --wsgi app:app
Set headers :
key | value |
---|---|
Content-Type |
application/json |
Authorization |
Bearer <token> |
- From your browser, get the swagger doc at http://localhost:5000/doc/
or
You can store instance configuration in instance/config.py
or
Set your own env var :
export LWP_CONFIG_FILE='/path/to/config/production.py'
- Logo : Thibaut Abou Mrad