Skip to content

List sorting

Sort parameters can be used to influence the result of a list request for both an entry and a resource of a list.

Sorting is only performed for lists with at most 500 children. For larger lists the sort parameters are ignored and the children are returned unsorted.

Parameters

Order

Determines whether the result should be ascending or descending.

Possible values:

  • asc
  • desc

Example: order=asc

Sort type

Determines which criteria should be sorted after. Several options:

  • title (title of the resource)
  • modified (modification date)
  • created (creation date)
  • size (file size)

Values are case-insensitive. An unknown value is ignored and the list is not sorted.

Example: sort=title

Language

Language can be used in connection with sort=title. It determines which language of the title should be prioritized.

Pattern: lang={langcode}

Prioritizing a Graph Type

In the default setting the priority of all Graph Types is equal. If a Graph Type should get a higher priority (and therefore show up above entries with a different Graph Type) the prio parameter can be used. The following example prioritizes Lists over other entries: prio=List

All Graph Types known to EntryStore can be used as a value for this parameter.

Please note that the value of this parameter is case-sensitive! In 6.x a value that is not a Graph Type is answered with 400.

Example

The following example makes use of all possible parameters. The list _top is sorted after the english titles of the contained entries, in a ascending order and with the folders showing up first:

http://base/1/entry/_top?format=application/json&includeAll&sort=title&lang=en&order=asc&prio=List