I have the Django Tastypie API installed.
I would like to query the database for the number of objects matching the name.
Is this possible on an existing model resource, or do I need to set up a new resource to handle this particular case? (Is this data usually returned in the metadata part of the result? Is there an option to return this from the parameters?)
So, if my url usually looks like this:
http://127.0.0.1:8000/api/v1/library/?name__icontains=ABC
Is it possible to add a parameter or change the URL so that it returns only metadata (I want only the number of libraries returned that have a name containing "ABC"), and not all objects?
source share