Filtering
The Tables API supports filtering results obtained from the ListRows
operation.
Usage
/v1alpha1/tables/{table id}/rows?filter=<filter>
Filter syntax
You can use the following parameters with the filter:
Parameter | Description | Supported Operators |
query |
Search for rows with a cell containing text starting with the provided query. This must be the only parameter in the filter and not conjugated with any other parameter. | = |
updateTime |
Filter rows based on the time the row was last updated. | > |
savedView |
Filter rows using the view ID of a saved view to fetch them as presented in the view. | = |
values.<column> |
Filter rows based on the values of a specific column. The column can be specified using the Column ID or Column name. | Described below |
- AND operators and sequences of tokens without operators are accepted and treated in the same manner.
- Quoted strings are interpreted as a single value rather than a sequence of tokens. This is also true for specifying multi-word column names in queries of type values.”column name”.
- “query” and “updateTime” filters may not be set more than once.
- Please refer to https://google.aip.dev/160 for more details.
Filterable fields
You can filter on the following fields using the values.<column>
parameter.
Column Type | Supported Operators |
Text | = |
Boolean (Checkbox) | = |
Number | <. <=, >, >=, = |
Person | =, : |
Creator/Updater | =, : |
Sorting
The Tables API supports sorting results obtained from the ListRows
and ListTables
operations.
Usage
/v1alpha1/tables/{table id}/rows?orderBy=<orderBy>
Sorting Syntax
You can sort the results by various parameters using the following syntax:
Value | Description |
---|---|
'' (empty string) |
Results are sorted in the default order. |
'name' or 'name asc' |
Results are sorted in ascending order by parameter 'name' |
'name desc' |
Results are sorted in descending order by parameter 'name'. |
Parameters supported for sorting
Results can be sorted on the following parameters:
Parameter | Description |
---|---|
createTime |
Time of creation of the resource. |
updateTime |
Time the resource was last updated. |