Mercurial > p > roundup > code
comparison doc/rest.txt @ 5865:04deafac71ab
Implement sorting of collections in REST API
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Mon, 26 Aug 2019 09:56:20 +0200 |
| parents | e0df29c18be8 |
| children | 1b57d8f3eb97 |
comparison
equal
deleted
inserted
replaced
| 5864:5e8e160fe2a0 | 5865:04deafac71ab |
|---|---|
| 341 number of items available if you were to retrieve all of them. | 341 number of items available if you were to retrieve all of them. |
| 342 | 342 |
| 343 Other data types: Date, Interval Integer, Number need examples and may | 343 Other data types: Date, Interval Integer, Number need examples and may |
| 344 need work to allow range searches. Full text search (e.g. over the | 344 need work to allow range searches. Full text search (e.g. over the |
| 345 body of msgs) is a work in progress. | 345 body of msgs) is a work in progress. |
| 346 | |
| 347 Sorting | |
| 348 ^^^^^^^ | |
| 349 | |
| 350 Collection endpoints support sorting. This is controlled by specifying a | |
| 351 ``@sort`` parameter with a list of properties of the searched class. | |
| 352 Optionally properties can include a sign ('+' or '-') to specify | |
| 353 ascending or descending sort, respectively. If no sign is given, | |
| 354 ascending sort is selected for this property. The following example | |
| 355 would sort by status (in ascending order of the status.order property) | |
| 356 and then by id of an issue:: | |
| 357 | |
| 358 @sort=status,-id | |
| 359 | |
| 346 | 360 |
| 347 Pagination | 361 Pagination |
| 348 ^^^^^^^^^^ | 362 ^^^^^^^^^^ |
| 349 | 363 |
| 350 Collection endpoints support pagination. This is controlled by query | 364 Collection endpoints support pagination. This is controlled by query |
