How to remove duplicate messages from an index?

You can either rebuild the range for all indices or for just one index.

You need to authenticate or use api tokens.

http://docs.graylog.org/en/3.0/pages/configuration/rest_api.html#interacting-with-the-graylog-rest-api