API call doesn't return text/csv format

I just upgraded from graylog 2.3.1 to the latest version and my reporting got broke

Basically I have a powershell script that runs ‘invoke-webrequest’ on an API request URL, and the result is a .csv file that I then run some formatting on and turn into a report. After upgrading, the API call no longer responds with text/csv content but instead the application/json format.

I went back into the API browser on the web console, made sure the response content type was ‘text/csv’ and generated a new Request URL (it was identical to the one I had generated previously). In the web console the Response Body was in text/csv format as expected, but when I try it in my report it just returns the application/json format.

Do I need to add something to my Request URL now to make it return text/csv?

You have to provide an “Accept” HTTP request header which tells the Graylog REST API what kind of media type you want as response.

That was it! thanks for the quick response

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.