All list endpoints have a query
parameter that allows the filtering
of results. The query syntax is a subset of
JsonPath.
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:
The root and children of the root can be drilled down into using two operators:
Name | Syntax | Note |
---|---|---|
Object subscript | $.key or $["key"] | |
Array indexing | $[0] | Only supported for arrays of simple types or fields that allow arbitrary data, such as metadata. |
Name | Example |
---|---|
int | 42 |
float | 3.1415 |
bool | true or false |
string | "\"Hello\", world!" |
null | null |
Name | Syntax |
---|---|
Equal | == |
Not equal | != |
Less than | < |
Less than or equal | <= |
Greater than | > |
Greater than or equal | >= |
{
"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
.