Stratosphere
...
Premium Features
Stratosphere API

Search, Sort, and Pagination for the Stratosphere API

5min
search, sort, and pagination searching, sorting, and pagination allow you to trim down the returned data, allowing you to focus on the data you only need search, sort, and paginate large result sets by defining their values in a query string appended to the url the details for searching, sorting, and pagination are outlined in examples below search a variety of comparison operators are available for use with search, depending on the data type of the property being searched comparison operators not/exclude ! equals eq not equals neq greater than gt greater than or equal gte less than lt less than or equal lte contains like does not contain notlike which comparison operators can be used with each data type category date/time data type datetime comparison operators eq, !, neq, lt, lte, gt, gte category date/time data type string comparison operators eq, neq, !, notlike category numeric data type numeric comparison operators eq, !, neq, lt, lte, gt, gte category numeric data type string comparison operators eq, !, neq, like, notlike category string data type string comparison operators eq, neq, !, notlike example search for all items with an expirationdate greater than feb 1, 2022 https //stratosphere app/api/1/items?expirationdate=gt 2022 02 01t00 00 00 000000 https //stratosphere app/api/1/items?expirationdate=gt 2022 02 01t00 00 00 000000 sort sorting allows you to sort return data in ascending or descending order for a property to sort, append asc or desc to a property if neither is defined, ascending order is the default example sort all devices by deviceserialnumber in descending order https //stratosphere app/api/1/devices?sort=deviceserialnumberdesc https //stratosphere app/api/1/devices?sort=deviceserialnumberdesc pagination define pagination by using the perpage and page parameters perpage dictates how many results display on one page, and page dictates which page is displayed example retrieve all products, group them in pages of 5 products each, and display page 2 https //stratosphere app/api/1/products?perpage=5\&page=2 https //stratosphere app/api/1/products?perpage=5\&page=2 combining searching, sorting, and pagination searching, sorting, and pagination can be combined using an ampersand (&) between each parameter example retrieve all removed transactions, sort them in ascending order by eventtime, group them in pages of 10 transactions each, and display page 3 https //stratosphere app/api/1/reports/transactions?type=removed\&sort=eventtimeasc\&perpage=10\&page=3 https //stratosphere app/api/1/reports/transactions?type=removed\&sort=eventtimeasc\&perpage=10\&page=3