Skip to main content

DataSetQuerySort

Specifies how the results from a data set query should be sorted.

This consists of a field in the data set and a direction to sort by.

Properties

Property Type Required Description
field string true

The name of the field to sort by. This can be one of the following:

  • timePeriod to sort by time period
  • geographicLevel to sort by the geographic level of the data
  • location|{level} to sort by locations in a geographic level where {level} is the level code (e.g. REG, LA)
  • filter|{id} to sort by the options in a filter where {id} is the filter ID (e.g. 3RxWP)
  • indicator|{id} to sort by the values in a indicator where {id} is the indicator ID (e.g. 6VfPgZ)

Validation constraints:

  • Maximum length: 40
  • Minimum length: 1
direction string true

The direction to sort by. This can be one of the following:

  • Asc - sort by ascending order
  • Desc - sort by descending order

Allowed options:

  • Asc
  • Desc

Example schema

{
  "field": "timePeriod",
  "direction": "Asc"
}