Graylog2 / Graylog2/graylog2-server
REST: Automatically select default index set with undefined index_set_id in POST to /streams
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
Feature request: I'm using the REST API to automate a Graylog cluster deployment. It would be cool if not setting index_set_id when creating a stream by POSTING to /streams would select the default index set automatically, taking advantage of the fact that a default index set is always defined. It would save one REST call.
## Expected Behavior
POST /streams:
```
{
"title": "<%=@title%>",
"description": "<%=@description%>",
"remove_matches_from_default_stream": false,
"matching_type": "AND"
}
```
should create a stream and automatically select the default index set to supply index_set_id.
## Current Behavior
Currently, the API call fails with an error message:
```
index set must not be null!
```
thus not taking advantage of the fact that a default index set is defined.
## Possible Solution
Automatically select index_set_id by choosing the default index set.
## Context
* Saves a REST API interaction during automatic node deployment / configuration.
## Your Environment
* Graylog Version: 2.2.2
* Elasticsearch Version: 2.4
* MongoDB Version: 3.4.2
* Operating System: Debian 8
* Browser version: Firefox 52.0.1
Contributor guide
Assessment
This issue has not been assessed yet.