mesos / kafka

Apache Kafka on Apache Mesos
Apache License 2.0
414 stars 140 forks source link

0.10: ReST API http method change #282

Closed shangd closed 7 years ago

shangd commented 7 years ago

We are trying out the 0.10 branch and found that most of the original GET methods in 0.9 for modifications have changed to POST. I understand that theoretically a ReST API is supposed to use the right http method for each type of action, but we already have a lot of client code that uses the GET only API in the current master.

Are we intending to maintain backward compatibility in 0.10 and keep the GET version of the API?

steveniemitz commented 7 years ago

The change to POST only for APIs that mutate state was intentional, previously having APIs like stop/restart/delete/etc exposed via GET was just a recipe for disaster. Unfortunately I believe that this is one place where breaking backward compatibility is worth the pain.

I will note the change in the 0.10 release notes. I recommend updating your tooling to use POST for everything, which will work with both 0.9 and 0.10 versions of the scheduler.

shangd commented 7 years ago

@steveniemitz that's fair enough, so for the mutation methods, are we gonna have PUT/DELETE as well (PUT for update and DELETE for remove), or is it POST only?

steveniemitz commented 7 years ago

I think in general the API needs a rethink. What I'd really like to see is a protobuf described API with a REST interface.

However, to answer your question, I don't have any plans to modify the existing interface any more (changing methods to PUT/DELETE for example).