PUT update row, size limit of 85Kb (42?)

I’m updating some tables with text with:
https://coda.io/developers/apis/v1#tag/Rows/operation/updateRow

At some point I was receiving errors like:

{"statusCode":400,"statusMessage":"Bad Request","message":"Row edit of size 87 KB exceeds maximum size of 85 KB."}

Which seems fair, however it seems like the limit is quite a bit lower than that?

> PUT /apis/v1/docs//tables//rows/ HTTP/2
> Host: coda.io
> content-type: application/json
> authorization: Bearer xxxxxxxxxx
> accept: */*
> content-length: 44291

The request returned the above error and is only 44KB.

From my (limited) testing, content-length:43665 passes, while 43860 fails.

I’m not complaining about the sizing, just that the error doesn’t seem correct?

1 Like

I believe this is content length and content size being two different measurements. The limit of 85 kB is based on size that it takes up on a harddrive and the content-length of 44 k is a character length.

85 KB is the maximum size the row can take in a Coda doc file. It includes all non-formula columns and any overhead (e.g. formatted text is stored as a JSON tree of sequential pieces of content that are differently formatted). Also I can’t remember whether in Coda, text data is stored as UTF-8 or UTF-16 (i.e. whether numbers and English letters occupy 1 byte or always at least 2 bytes per character) — if it’s the latter then the size is taken up twice as fast than the size of text you send in your (usually UTF-8) API requests.

So could be either thing. Either you have extra columns that e.g. get auto-populated with data when you add a row, or Coda encodes data in UTF16 (which I honestly don’t remember, even though I used to examine the codabuf format a while ago)

1 Like

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