from value represents the scope and templateKey of the
metadata template, and the ancestor_folder_id represents the folder ID to
search within, including its subfolders.
The fields parameter
By default, this API will only return the base-representation of a file or
folder, which includes their id, type, and etag values. To request any
additional data the fields parameter can be used to query any additional
fields, as well as any metadata associated to the item.
For example:
created_bywill add the details of the user who created the item to the response.metadata.<scope>.<templateKey>will return the base-representation of the metadata instance identified by thescopeandtemplateKey.metadata.<scope>.<templateKey>.<field>will return all fields in the base-representation of the metadata instance identified by thescopeandtemplateKeyplus the field specified by thefieldname. Multiple fields for the samescopeandtemplateKeycan be defined.
The query parameter
The query parameter represents the SQL-like query to perform on the selected
metadata instance. This parameter is optional, and without this parameter the
API would return all files and folders for this template.
Every left hand field name, like amount, needs to match the key of a
field on the associated metadata template. In other words, you can only search
for fields that are actually present on the associated metadata instance. Any
other field name will result in the error returning an error.
The query_params parameter
To make it less complicated to embed dynamic values into the query string, an
argument can be defined using a colon syntax, like :value. Each argument that
is specified like this needs a subsequent value with that key in the
query_params object, for example:
Logical operators
A query supports the following logical operators.Any match on a
string or enum field is case sensitive except when using
the ILIKE operator.Comparison operators
A query supports the following comparison operators.Pattern matching
TheLIKE, NOT LIKE, ILIKE, and NOT ILIKE operators match a string
to a pattern. The pattern supports the following reserved characters.
%The percent sign represents zero, one, or multiple characters, for example%ContractmatchesContract,Sales Contract, but notContract (Sales),_The underscore represents a single character, for exampleBo_matchesBox,Bot, but notBots,
Box% (____) would match Box Contract (2020).
An example query would looks something like this. Note that the %-wrapped
string is not in the query attribute but in the list of query_params.
The backslash character
\ can be used to escape the % or
_ characters if those need to be matched literally, for example
20\% would match the literal value of 20%.