Compressed transmission of API responses

Last modified: 20. September 2022

Since Monday 16/12/2019 in the evening, the endpoints of the ITscope Product API also support the Content-Encoding: gzip compressed transmission. All clients that send requests with the Accept-Encoding: gzip HTTP header, will receive the XML or JSON response compressed with gzip.


The common browsers convert the header by default. However, if you retrieve XML/JSON via the product API, or retrieve product exports with other clients, you can reduce traffic with the following settings:

  • curl: Use ‘curl –compressed’ to transfer the data compressed and uncompress directly
  • wget: wget -q -O- –header=”Accept-Encoding: gzip” <url> | gzip -cdf > export.xml
  • for other clients, please check the documentation to see how to set the Accept-Encoding header in the request.

The use of this is optional. However, if you make a lot of requests, or download large XML or JSON exports (the largest, above 30 GB, are uncompressed), we would appreciate it if you use compression. This will speed up the transfer considerably.

Was this article helpful?
Dislike 0
Views: 171