Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

When searching for items, you can sort the result set.

Many API endpoints support filtering and sorting of the data they return.

These endpoints usually, but not always, have a 'Search' word in their URI, like '/Consumers/Search'.



Advanced Panelboxes for Confluence
namegrey
titleOn this page:

Table of Contents
maxLevel3
minLevel2
indent20px
separatornewline


Building sort expression

Sort expressions are defined as JSON. It's defined as a collection of sort specs, for example:

Code Block
languagejs
titleSort Expression
[  
  {  
     "Column":"Column1",
     "Direction":"ASC"
  },
  {  
     "Column":"Column2",
     "Direction":"DESC"
  }
]
  • ASC - sort in ascending order - the default if no direction 's is specified
  • DESC - sort in descending order.