def get_ordering(self, request, queryset, view):
        params = request.query_params.get(self.ordering_param)
        if params:
            fields = [param.strip() for param in params.split(',')]
            ordering = self.remove_invalid_fields(queryset, fields, view)
            if ordering:
                return ordering

        # No ordering was included, or all the ordering fields were invalid
        return self.get_default_ordering(view)
Ordering is set by a comma delimited ?ordering=... query parameter.
dataset/ETHPy150Open tomchristie/django-rest-framework/rest_framework/filters.py/OrderingFilter.get_ordering