Enable sorting REST API results #8995
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
Milestone
NetBox version
v3.1.10
Feature type
New functionality
Proposed functionality
Allow users to specify a field by which the results of a REST API query should be ordered. For example:
This seems easily feasible by adding DRF's built-in OrderingFilter to
DEFAULT_FILTER_BACKENDS
. We'll also need to defineordering_fields
on each API view set.Edit: This was first proposed in #3650.
Use case
Allows for more efficiently retrieving a set of objects in a particular order via the REST API.
Database changes
No response
External dependencies
No response
The text was updated successfully, but these errors were encountered: