CSV export using API

(Matt) #1

Can a search result be output to csv via API. I see the option within the interface under “More Actions”. But not finding where I can do this under the api browser.

API call doesn't return text/csv format
(Jochen) #2

Yes, absolutely!

You can request the search results of a query in CSV format by using the regular search resources (e. g. /search/universal/absolute) and setting the HTTP Accept header to text/csv or use the /export resource (e. g. /search/universal/absolute/export).

The export of dataset in a CSV file with graylog API is very slow in version 2.4.6 (docker cluster)
(Matt) #3

Thank you so much Jochen. I was even looking for an export resource but somehow my eyeballs must not be working. Again thank you for the response. This is gonna come in super handy.

(system) closed #4

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