HTTP has built-in support for compression of HTTP responses with for example gzip.
Currently this does not seem to be supported by the API (but the main website does use it).
Compression leads to a HUGE reduction in bandwith usage.
Small experiments on my end lead to 10x reductions with gzip.
That is not too surprising as JSON typically contains many repeating patterns.
Enabling it should be a matter of changing some configuration setting and will not break existing code (like I said, it is supported by the HTTP protocol).
For more information see:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding The Accept-Encoding header in the request lists the accepted encodings by the client.
The Content-Encoding header in the response specifies which encoding was used by the server
Comments
It is also a breaking change for people (like me) that were making these calls.
Would it be an idea to allow batch requests for BOIDs that do specify a color? They typically return much fewer lots. In a sense a request for a BOID with no color specified is already a bit of a bulk request. Without the bulk requests I am inclined to reduce the number of calls I make by not specifying a color, which is a net increase of the load I am causing your servers.
The thing is that a large MOC often contains close to 600 different part-color combinations. It would then take more than a minute to fetch all the data (if the info is no longer in my cache). And that is assuming is 1 user at a time.