[ML] Make get scheduled events endpoint and spec consistent with docs#78923
[ML] Make get scheduled events endpoint and spec consistent with docs#78923droberts195 wants to merge 1 commit intoelastic:masterfrom
Conversation
The docs for the get scheduled events endpoint stated that the arguments could be sent in a request body instead of in URL arguments. The spec was inconsistent with this. Additionally, GET endpoints that allow a request body need to support POST too, for the benefit of clients that do not support GETs with bodies. This change adds the option to POST a get scheduled events request and adjusts the spec to permit this. Relates to elastic/elasticsearch-specification#852
|
Pinging @elastic/clients-team (Team:Clients) |
|
Pinging @elastic/ml-core (Team:ML) |
| @@ -14,7 +14,8 @@ | |||
| { | |||
| "path":"/_ml/calendars/{calendar_id}/events", | |||
There was a problem hiding this comment.
Doesn't this method+path combination conflict with the ml.post_calendar_events API?
There was a problem hiding this comment.
Ah, yes. I guess that is why having a POST option for this endpoint wasn't implemented in the first place.
So it's impossible to fix all the discrepancies.
All the functionality is available to the clients using a GET with URL arguments. There's nothing you can do with GET+body that you cannot do with GET+URL args.
It's just that we cannot adhere to the rule that GET+body always supports POST as well because of the POST endpoint that does something different, and we've already documented that GET+body is possible, so we cannot remove that option.
So we're left with an endpoint that doesn't obey all the conventions and cannot be changed.
The docs for the get scheduled events endpoint stated that the
arguments could be sent in a request body instead of in URL
arguments. The spec was inconsistent with this.
Additionally, GET endpoints that allow a request body need to
support POST too, for the benefit of clients that do not support
GETs with bodies.
This change adds the option to POST a get scheduled events
request and adjusts the spec to permit this.
Relates to elastic/elasticsearch-specification#852