Open lorddaedra opened 6 years ago
you use Django rest framework for API, so...
this plugin looks as solution https://github.com/wimglenn/djangorestframework-queryfields docs: http://djangorestframework-queryfields.readthedocs.io/en/latest/ looks easy, add 1 Mixin and some tests...
or you can use some answers here: https://stackoverflow.com/questions/23643204/django-rest-framework-dynamically-return-subset-of-fields
ISSUE TYPE
COMPONENT NAME
SUMMARY
Add ability to limit fields in output for all get list requests (get projects list, get inventory list, get job templates list etc.)
https://.../?fields=id,description
EXPECTED RESULTS
Will be included only
id
anddescription
fields in output json.