Werk #13049: RESTAPI: require accept header

Component Core & Setup
Title RESTAPI: require accept header
Date Oct 5, 2021
Checkmk Editon Checkmk Raw (CRE)
Checkmk Version 2.1.0i1
Level Trivial Change
Class New Feature
Compatibility Incompatible - Manual interaction might be required

In previous version the accept header of the HTTP-request was completely ignored.

With this werk the accept header is obligatory. If no or a wrong accept header is provided an error with a 406 status code will be returned.

For most requests this means you have to provide the follwing header line:

Accept: application/json

For some other requests different accept headers may be required. All headers are documented in the official rest-api documentation.

For example when downloading the agent binary the following header is required:

Accept: application/octet-stream

To the list of all Werks