Queries

All list endpoints have a query parameter that allows the filtering of results. The query syntax is a subset of JsonPath.

Syntax

A typical query looks as follows:

$.key_name[0]["another_key"] >= "some literal value"

The general format for a query is

<root_object_access> <comparator> <literal_value>

In the above example, $ is the root object, i.e. the type of object returned by the list endpoint. Two types of operations on the root are allowed:

Root operators

The root and children of the root can be drilled down into using two operators:

NameSyntaxNote
Object subscript$.key or $["key"]
Array indexing$[0]Only supported for arrays of simple types or fields that allow arbitrary data, such as metadata.

Types

NameExample
int42
float3.1415
booltrue or false
string"\"Hello\", world!"
nullnull

Operators

NameSyntax
Equal==
Not equal!=
Less than<
Less than or equal<=
Greater than>
Greater than or equal>=

Example

{
  "child" {
    "id": 3
    "name": "ACME inc.",
  },
  "metadata": {
    "internal_references": {
      "company_id": 123
    }
  }
}

To filter on the company_id you can use the query $.metadata.internal_references.company_id == 123. Or, URL encoded: ?query=%24.metadata.internal_references.company_id%3D%3D123.