This adds filtering capabilities to endpoints. Each endpoint has a set of fields by which filtering is permitted. This is a simple equality filter (i.e. the value given has to exactly match the value of the field).
For example, http://127.0.0.1:8000/api/tests/?device__id=2&name=test_01 returns tests named test_01 which are for the device with an ID of 2. To see all available fields for filtering, refer to the filterset_fields list in each viewset.
Some endpoints also have support for ordering. For example, http://127.0.0.1:8000/api/test_history/?ordering=started_at. This can be combined with filters. To see more information, refer to the docs. To see all available fields for ordering, refer to the ordering_fields in each viewset.
This adds filtering capabilities to endpoints. Each endpoint has a set of fields by which filtering is permitted. This is a simple equality filter (i.e. the value given has to exactly match the value of the field).
For example,
http://127.0.0.1:8000/api/tests/?device__id=2&name=test_01
returns tests namedtest_01
which are for the device with an ID of2
. To see all available fields for filtering, refer to thefilterset_fields
list in each viewset.Some endpoints also have support for ordering. For example,
http://127.0.0.1:8000/api/test_history/?ordering=started_at
. This can be combined with filters. To see more information, refer to the docs. To see all available fields for ordering, refer to theordering_fields
in each viewset.