Grist Octri Preview
GET/docs/{docId}/tables/{tableId}/dataDeprecated

Fetch data from a table

Deprecated in favor of records endpoints. We have no immediate plans to remove these endpoints, but consider records a better starting point for new projects.

8 parameters
docIdstringrequired
A string id (UUID)
tableIdstringrequired
normalized table name (see `TABLE ID` in Raw Data) or numeric row ID in `_grist_Tables`
filterstringoptional
This is a JSON object mapping column names to arrays of allowed values. For example, to filter column `pet` for values `cat` and `dog`, the filter would be `{"pet": ["cat", "dog"]}`. JSON contains characters that are not safe to place in a URL, so it is important to url-encode them. For this example, the url-encoding is `%7B%22pet%22%3A%20%5B%22cat%22%2C%20%22dog%22%5D%7D`. See https://rosettacode.org/wiki/URL_encoding for how to url-encode a string, or https://www.urlencoder.org/ to try some examples. Multiple columns can be filtered. For example the filter for `pet` being either `cat` or `dog`, AND `size` being either `tiny` or `outrageously small`, would be `{"pet": ["cat", "dog"], "size": ["tiny", "outrageously small"]}`.
sortstringoptional
Order in which to return results. If a single column name is given (e.g. `pet`), results are placed in ascending order of values in that column. To get results in an order that was previously prepared manually in Grist, use the special `manualSort` column name. Multiple columns can be specified, separated by commas (e.g. `pet,age`). For descending order, prefix a column name with a `-` character (e.g. `pet,-age`). To include additional sorting options append them after a colon (e.g. `pet,-age:naturalSort;emptyLast,owner`). Available options are: `orderByChoice`, `naturalSort`, `emptyLast`. Without the `sort` parameter, the order of results is unspecified.
limitnumberoptional
Return at most this number of rows. A value of 0 is equivalent to having no limit.
cellFormatstringoptional
With "typed", every cell value is returned in a self-describing typed form, e.g. a Date as `["d", timestamp]` and a Reference as `["R", tableId, rowId]`, and formula errors are returned inline as `["E", ...]` values. The default "normal" format uses compact values whose interpretation depends on the column type. See [Grist data format](https://github.com/gristlabs/grist-core/blob/main/documentation/grist-data-format.md) for details.
Allowed:normaltyped
X-Sortstringoptional
Same as `sort` query parameter.
X-Limitnumberoptional
Same as `limit` query parameter.

1 status code
200Cells from the table
idarray<integer>required