Refactor API
Refactor the API to fully use Django-Rest-Framework features and fully expose the backend through a (nearly) RESTful API.
See https://gitlab.federez.net/federez/re2o/wikis/API/Raw-Usage for usage
To-do tasks:
-
Write authentication -
Authentication by cookie session -
Authentication by token -
Use expiring tokens -
See if DRF-JWT is ok to use instead of django-authtoken (
-
-
Write permission -
Add a "see and use API" permission -
Use standard ACL in addition for model-based endpoints -
Add a way to easily specify custom ACL-based permission (in case no model is available)
-
-
Write endpoints -
Expose the models data in read-only -
Expose preferences data -
Expose data for the service regen and marking service regen done -
Expose specific endpoint for DNS -
Expose specific endpoint for DHCP -
Expose specific endpoint for Mailing -
Expose missing models (that were added recently)
-
-
Documentation -
Document the usage (auth, permissions, api client, ...) -
Document the endpoints -
Properly comment the code -
Complete Changelog
-
-
Clean up tests -
Write tests to check authentication behavior -
Write tests to check permission behavior -
Write basic tests to check HTTP status code on every endpoint -
Write tests that creates simple objects and check if they are really exposed via the API (need test DB and LDAP)
-
Fix #128 (closed)