API: support order_by on results