advancedsearch

advancedsearch is a format for specifying complex search queries to a REST API

Queries are specified by passing a JSON string as a URL parameter. The encoded JSON object represents the nested query.

Queries are made up of nested and and or nodes. The leaves of the query trees are condition nodes, which can use the following supported conditions:

Example

The example below will match resources that have their name field equal to "foo" or their date field between "2020-01-01" and "2020-01-20"

        {
          "t": "or",
          "c": [
            {
              "t": "and",
              "c": [
                {
                  "t": "gt",
                  "f": "date",
                  "v": "2020-01-01"
                },
                {
                  "t": "lt",
                  "f": "date",
                  "v": "2020-01-20"
                }
              ]
            },
            {
              "t": "eq",
              "f": "name",
              "v": "foo"
            }
          ]
        }
      

Caveats

The API using advancedsearch may limit the complexity of queries to avoid overutilization of computing resources by API consumers. When this happens, it will return a response that indicates your query was too costly to perform.