Discovered in elastic/elasticsearch-specification#852 the ml.get_calendar_events API specifies a body and has a route with method: GET but unlike other Elasticsearch APIs doesn't provide an alternative method like POST or PUT which can cause issues for generated language clients as some cannot specify GET with a body.
The trouble is that we cannot add POST to the list of methods for the already defined path /_ml_calendars/{calendar_id}/events as it'd conflict with the path of the ml.post_calendar_events API.
My proposal is to add an additional path for the API (maybe /_ml/calendars/{calendar_id}/get_events?) that defines both GET and POST as is typical of most APIs. This wouldn't require explicitly deprecating the existing path but may require a documentation update to list the new path for others to use?
cc @lcawl @droberts195
Discovered in elastic/elasticsearch-specification#852 the
ml.get_calendar_eventsAPI specifies abodyand has a route withmethod: GETbut unlike other Elasticsearch APIs doesn't provide an alternative method likePOSTorPUTwhich can cause issues for generated language clients as some cannot specify GET with a body.The trouble is that we cannot add
POSTto the list of methods for the already defined path/_ml_calendars/{calendar_id}/eventsas it'd conflict with the path of theml.post_calendar_eventsAPI.My proposal is to add an additional
pathfor the API (maybe/_ml/calendars/{calendar_id}/get_events?) that defines bothGETandPOSTas is typical of most APIs. This wouldn't require explicitly deprecating the existing path but may require a documentation update to list the new path for others to use?cc @lcawl @droberts195