In 2.4.5 we're able to query /search/universal/keyword with the query and range. After upgrading to 2.4.6 the same scripts replied with {u'message': u'Missing required parameterfields', u'type': u'ApiError'} Downgrading to 2.4.5 resolved the issue.
The URL we use in the python script is /api/search/universal/keyword?query=source%3A%22{0}%22%20OR%20gl2_remote_ip%3A%22{1}%22&keyword=last%2030%20days&limit=1&decorate=true"
Adding fields to the URL did not solve the issue.
This is for an Icinga2 plugin that checks the hostname in icinga2 against the source in graylog for continuity between the systems.
There hasn't been any change in the optionality of these parameters between Graylog 2.4.5 and 2.4.6.
See https://github.com/Graylog2/graylog2-server/compare/2.4.5...2.4.6 for a complete diff.
However, the fields parameter is required when exporting the search result as CSV file:
https://github.com/Graylog2/graylog2-server/blob/2.4.5/graylog2-server/src/main/java/org/graylog2/rest/resources/search/KeywordSearchResource.java#L127-L133
Make sure to send a valid Accept header with your requests to the Graylog REST API, i. e. Accept: application/json in this case.
Adding headers = {'Accept': 'application/json'} fixed it and we upgraded to 2.4.6. Thanks for the support.
Thanks for the information, this fixed my problem with the /relative search endpoint as well
Most helpful comment
There hasn't been any change in the optionality of these parameters between Graylog 2.4.5 and 2.4.6.
See https://github.com/Graylog2/graylog2-server/compare/2.4.5...2.4.6 for a complete diff.
https://github.com/Graylog2/graylog2-server/blob/2.4.5/graylog2-server/src/main/java/org/graylog2/rest/resources/search/KeywordSearchResource.java#L87-L97
However, the
fieldsparameter is required when exporting the search result as CSV file:https://github.com/Graylog2/graylog2-server/blob/2.4.5/graylog2-server/src/main/java/org/graylog2/rest/resources/search/KeywordSearchResource.java#L127-L133
Make sure to send a valid
Acceptheader with your requests to the Graylog REST API, i. e.Accept: application/jsonin this case.