Export tables via Admin API

Hi!

I’m building a 3rd party integration that uses the Coda API. Typically our users would create a token which has access to the Admin API, but that token would not have access to individual documents directly. This means that it’s not possible to query the non-admin API with the same credentials.

Reading and exporting documents has gone well, until I wanted to export tables. Turns out there is no corresponding endpoint in the admin API. Is there some workaround for this?

Additionally, it seems that the document export via the admin API truncates tables at some amount of rows/size. Is this intentional, and any idea what the limit is if it exists?

Thanks!

1 Like

As I know, the Admin API is for org administration rather than content access. I think with the current state of both API’s, you’ll have to use some sort of hybrid setup with the Admin API using the org features and the doc level tokens to access the content. If I remember correctly, you could create/delete tokens for users docs via Admin API.

”Additionally, it seems that the document export via the admin API truncates tables at some amount of rows/size. Is this intentional, and any idea what the limit is if it exists?”

Could this be the 125mb?

1 Like

Hi @OssiR - You are correct that the Admin API doesn’t currently provide the ability to read table data. The workaround that some apps use is to:

  1. Create a “bot” user for reading table data.
  2. Use the Admin API to share each doc with the bot user.
  3. Use the Coda API with the bot user’s token to read the table data.

However, there are sharing limits built into the product that make it challenging to do this at scale.

I’m not aware of table truncation happening in the document export, but it would make sense that the system has some upper limit.

1 Like

Thanks! That does sound like a decent workaround, I somehow missed this option. I’ll have to try this out.

Any specific limits that come to mind that would prevent scaling this up? Wouldn’t one user per workspace be enough, and having permission for one doc at a time? Of course there are rate limits that affect how fast this can be done, but that isn’t the primary concern right now.

Ya, the rate limit on sharing docs, which is across the entire product not just in the API, is the concern on scaling. But if that isn’t a concern then you should be good to go.

Gotcha. Any idea what the sharing rate limit is, if it’s different than the per-user read/write limits defined in the API docs?

The sharing limits are complicated and depend on different user signals. We can’t be as transparent around the limits, as they are part of how we fight spam and abuse on the product.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.