Undocumented 65535 character limit on requests?

I sent a large POST to https://api.github.com/repos/.../check-runs and received an error

{"message":"Invalid request.\n\nOnly 65535 characters are allowed; 397488 were supplied.","documentation_url":"https://developer.github.com/v3/checks/runs/#create-a-check-run"}

https://www.google.com/search?q=site%3Adeveloper.github.com+65535 yields no hits and https://developer.github.com/v3/ has no mention of such a limit. This is a bit troublesome because the message suggests that the limit is on the total request size—JSON? encoded body?—rather than a particular field. When using a client library I am not building the request directly so it is hard to predict what the final size will be, so I am not sure what to do other than keep all Markdown fields much smaller than this, say 50Kb in total.

Hi @jglick apologies for your post languishing. For that particular endpoint, the limit you mentioned applies to both the text and summary fields of the output object.

It’s unfortunate that this still seems to be undocumented, even over at docs.github.com.

It does look like this conversation took place internally to get this doc’d, and I’m following up with the team.

If/when we have an update, I’ll follow up here!

Hey again @jglick o/

Followed up with our docs team responsible for our APIs, and this is now on a sprint board. It’s not a high priority item and I can’t possibly speak to any kind of ETA for now.

Though, this is being reprioritized and I thank you for bringing it up, here! The added visibility is helpful =)

There is no rush. For now I have dealt with this by just truncating any combined Markdown which approaches this size. It would be great to have this and similar limits documented clearly. May summary and text each be 65535 characters (or UTF-8 bytes?) long, or in total, or the whole JSON body? Are there other limits on other textual fields, such as annotations or URLs?

Hey @jglick big +1 on this being clearly documented; and to reiterate, is on our Doc’s team current sprint.

May summary and text each be 65535 characters (or UTF-8 bytes?) long

That’s correct; each field have the same 65535 byte limit.

I think the only thing beyond this that hasn’t been mentioned yet, is the image size limit of the same value. Images against this endpoint also have the 65535 byte limit. Though there is no combined limit, but limits per field for text, summary, and images.