Fleio backend (and API)

The Fleio API is not yet documented, but you have the Python source code available in path /var/webapps/fleio/project and you can browse the source code to see API parameters.

To see what HTTP requests the Fleio frontend is making to the backend and what JSON responses are returned open your Fleio installation in the Google Chrome browser and use the Chrome Developer Tools feature.

Other browsers have similar developer tools: Firefox or Edge.

Here’s how this looks in Chrome:

../_images/fleio-chrome-dev-tools.png

Django REST framework (DRF) offers a browsable API, where you can see a list of available URLs, list of objects in JSON format and also simulate a few create/update operations.

To enable the DRF browsable API add this line the end of to your /var/webapps/fleio/project/fleio/settings.py file:

REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] += ('rest_framework.renderers.BrowsableAPIRenderer', )

Don’t forget to reload the code in the uwsgi server every time you modify Python source code. Run this command in your server’s console to reload the code:

sudo systemctl reload uwsgi

Make sure you are authenticated as a staff user and you should be able to see a page like this one at URL http://mydomain/backed/staffapi/clients:

../_images/staff-api-client.png