We encountered the error HTTP Error 414. The request URL is too long when submitting a very long fetchXml query to the API, and upon investigation, the on-premise IIS server web.config must be updated to support larger maxQueryString from 8192 to higher value.
I would like to ask what is the default value for the CRM 365 online, because we didn't encountered this on the online version using the same FetchXml string.