Many bulk read endpoints support an optional sorting parameter, using which results can be sorted on some attribute.
The sorting attribute is dependent on the specific API endpoint, and the grouping parameter in use. The user gets to specify whether the sort order should be ascending or descending.
For ungrouped results, the sorting attribute is a primary field of the members of the ungrouped intermediate result set (for example,
_id). For grouped results, the sorting attribute is always the grouping attribute.