github.com/kaleido-io/firefly@v0.0.0-20210622132723-8b4b6aacb971/docs/developers/api_query_syntax.md (about) 1 --- 2 layout: default 3 title: API Query Syntax 4 parent: Developers 5 nav_order: 3 6 --- 7 8 # API Query Syntax 9 {: .no_toc } 10 11 ## Table of contents 12 {: .no_toc .text-delta } 13 14 1. TOC 15 {:toc} 16 17 --- 18 19 ## Syntax Overview 20 21 REST collections provide filter, `skip`, `limit` and `sort` support. 22 - The field in the message is used as the query parameter 23 - When multiple query parameters are supplied these are combined with AND 24 - When the same query parameter is supplied multiple times, these are combined with OR 25 26 ## Example API Call 27 28 `GET` `/api/v1/messages?confirmed=>0&type=broadcast&topic=t1&topic=t2&context=@someprefix&sort=sequence&descending&skip=100&limit=50` 29 30 This states: 31 32 - Filter on `confirmed` greater than 0 33 - Filter on `type` exactly equal to `broadcast` 34 - Filter on `topic` exactly equal to `t1` _or_ `t2` 35 - Filter on `context` containing the case-sensitive string `someprefix` 36 - Sort on `sequence` in `descending` order 37 - Paginate with `limit` of `50` and `skip` of `100` (e.g. get page 3, with 50/page) 38 39 Table of filter operations, which must be the first character of the query string (after the `=` in the above URL path example) 40 41 | Operator | Description | 42 |----------|-----------------------------------| 43 | (none) | Equal | 44 | `!` | Not equal | 45 | `<` | Less than | 46 | `<=` | Less than or equal | 47 | `>` | Greater than | 48 | `>=` | Greater than or equal | 49 | `@` | Containing - case sensitive | 50 | `!@` | Not containing - case sensitive | 51 | `^` | Containing - case insensitive | 52 | `!^` | Not containing - case insensitive |