Hub 2018.3 Help

Sort Syntax

This document provides a BNF description for Hub sort grammar.

Grammar

<SORT> ::= <OrderBy>+ EOF; <OrderBy> ::= <Field> ( ":" ( "asc" | "desc" ) )?

Grammar is case-insensitive.

  • <Field> — the name of a field to sort by. For example, id, email, name, and so on.

Supported Fields and Sort Order

The list of supported fields for sorting depends on the requested resource. In its turn, each field has its own default sorting order. You can receive the default sorting order in the response to a "get all" request to the required resource.

Samples

Query

Description

name

Sort by the field "name" in a default order.

name:asc

Sort by field name in the ascending order.

group, name:desc

Sort by "group" first, then entries with the same group sort by name in the descending order.

Last modified: 17 December 2018