Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Issue with the API after upgrading to the latest version


I am getting the following error when trying to get a JSON result from the API:

{“result”:false,“error”:“Accept header invalid (use Accept: application/json)”}

Here’s the call:


And in test rail it is in fact a Test Run


This worked before upgrading from an older version of the API. Any ideas on what needs to be changed?



Hi Matt,

Thanks for your posting. The API requires that you set the “Accept: application/json” HTTP header for all requests. While this was also needed for previous versions of the API (as noted in the documentation), previous API versions didn’t enforce this and didn’t return an error when the header wasn’t sent. So you would basically just need to set the header on all requests to resolve this. We can also take a look at your code and suggest the best way to do this if you want to share a code snippet.



Thanks Dennis,
I updated my Java interface to include ‘connection.setRequestProperty(“Accept”, “application/json”);’ in my GET and POST requests.