Multiple query options when getting rows via API

Hi,

I’m building a pythonic library for the coda API, and the querying limitations of the “list table rows” endpoint are a major pain point.

Currently the only option for many manipulations is to list all rows and do the filtering on the client side, which becomes slow and expensive for large tables.
Sometimes I can loop through the rows I need and request them one by one. But this is often slower than getting all the rows even if we are only requesting a dozen rows or so, due to so many round trips to the server and back.

In addition to expanding the ‘query’ parameter to handle multiple columns as suggested above, and more crucial in my humble opinion, we need to have the ability to query for specific row_ids, e.g. via a new parameter:
requestedRowIds = [“i-KtoidMyme3” , “i-2RGnw0_Jyj”]

This can be a separate parameter, which if provided, overrides “query” and “visibleOnly” parameters.

Some of the use cases:

  • After upserting rows, I would want to only refresh the affected rows on the library’s representation of the table. The “insert/upsert rows” endpoint helps by providing “addedRowIds” array, and the API should complete the circle and allow me to list them later on.

  • Lookup columns: let’s say my table has only 10 rows and two columns : User and CurrentProject.
    The latter being a single select lookup from the much larger Projects table which has 1000s of rows.
    I can easily identify the table and row ids of each of the 10 projects via the api using “rich” values.
    But if I then wanted to get their some of their attributes such as Projects.Client, Project.StartDate, then once again I am stuck between the two bad choices of either loading the whole projects table or making 10 API calls to get the 10 rows.

3 Likes