Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3667

Ordering and sorting in RESTful api

$
0
0

I want to allow users to choose which property they would like to sort by then choose whether to order by ascending or descending.

For example, to sort based on the title and by descending order you would make a call to the api like so:

api/blogs?sortBy=title&orderBy=desc

Is this the best way to go about doing this?

I can't find anything useful online and most posts explain that sort by and order by are basically the same thing.

What are peoples opinions on this?


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>