-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML] all multiple wildcard values for GET Calendars, Events, and DELETE forecasts #62563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] all multiple wildcard values for GET Calendars, Events, and DELETE forecasts #62563
Conversation
|
Pinging @elastic/ml-core (:ml) |
davidkyle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for all the tests
| /** | ||
| * Helper function for adding OR type queries for a given identity field. | ||
| * | ||
| * This adds a new filter to the passed `boolQueryBuilder`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * This adds a new filter to the passed `boolQueryBuilder`. |
| return this; | ||
| } | ||
|
|
||
| public ResultsFilterBuilder resourceTokenFilers(String fieldName, String[] tokens) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public ResultsFilterBuilder resourceTokenFilers(String fieldName, String[] tokens) { | |
| public ResultsFilterBuilder resourceTokenFilters(String fieldName, String[] tokens) { |
| pageParams = PageParams.defaultParams(); | ||
| } | ||
| getCalendars(pageParams, listener); | ||
| final String[] calendarIds = Strings.splitStringByCommaToArray(request.getCalendarId()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GET request docs will need updating to add the standard description of a wildcard-able ID parameter
"comma-separated list of calendar Ids and wildcard expressions. You can get all by using _all, or * or by omitting the ID"
|
@elasticmachine update branch |
…TE forecasts (elastic#62563) This commit adjusts the following APIs so now they not only support an `_all` case, but wildcard patterned Ids as well. - `GET _ml/calendars/<calendar_id>/events` - `GET _ml/calendars/<calendar_id>` - `GET _ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>` - `DELETE _ml/anomaly_detectors/<job_id>/_forecast/<forecast_id>`
…TE forecasts (#62563) (#62629) This commit adjusts the following APIs so now they not only support an `_all` case, but wildcard patterned Ids as well. - `GET _ml/calendars/<calendar_id>/events` - `GET _ml/calendars/<calendar_id>` - `GET _ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>` - `DELETE _ml/anomaly_detectors/<job_id>/_forecast/<forecast_id>`
This commit adjusts the following APIs so now they not only support an
_allcase, but wildcard patterned Ids as well.GET _ml/calendars/<calendar_id>/eventsGET _ml/calendars/<calendar_id>GET _ml/anomaly_detectors/<job_id>/model_snapshots/<snapshot_id>DELETE _ml/anomaly_detectors/<job_id>/_forecast/<forecast_id>