Ordering
Ordering
By default, the entries presented in each response are ordered by their calculated fields (e.g., share, avgRisk).
However, all requests support the orderBy query parameter, which allows you to modify this behaviour.
Syntax
Ascending order
?orderBy=<str>:asc
Descending order
?orderBy=<str>:desc
Implicit ascending order
?orderBy=<str>
Supported values
- Any calculation, regardless of its presence in the resulting entry.
- Any field that is present in the resulting entry.
Ordering by multiple fields / calculations
To order by multiple fields and / or calculations, put them separated by a comma (,).
Examples
| Query parameters | Meaning |
|---|---|
? (empty) | Default, order by the calculations in descending order. |
?orderBy=foo | Order by the foo field in an (implicit) ascending order. |
?orderBy=foo:asc | Order by the foo field in an ascending order. |
?orderBy=foo:desc | Order by the foo field in a descending order. |
?orderBy=foo,bar | Order by foo and then order by bar. |
Updated about 2 months ago