> On May 13, 2015, 10:25 p.m., Marco Massenzio wrote: > > docs/reservation.md, line 71 > > <https://reviews.apache.org/r/32982/diff/1/?file=921006#file921006line71> > > > > this seems to imply that in the Request, the `slave_id` is some part of > > a "form" submission: > > ``` > > -d, --data <data> > > (HTTP) Sends the specified data in a POST request to the HTTP > > server, in the same way that a browser does > > when a user has filled in an HTML form and presses the submit > > button. This will cause curl to pass the data to the server > > using the content-type application/x-www-form-urlencoded. > > ``` > > > > IMO the API should instead carry the `slave_id` either as part of the > > URL (`/reserve/slave_id/1234-xyz`) or part of the JSON body: > > ``` > > { > > "slave_id": "1234-xyz", > > "resources": { > > "name" : "cpus", > > "type" : "SCALAR", > > "scalar" : { "value" : 8 }, > > ... > > } > > } > > ``` > > Also, we need to be sure that the `Content-Type` is set accordingly > > (`application/json`) > > > > The same for all the other endpoints.
I think just having it all be in the request body is more like how Mesos does all the rest of it's endpoints currently. For the HTTP API version would be nice to do JSON, but the current protobuf/http Mesos APIs currently they all work on the "form encoding" thing which is a standard (Although mesos only implements a specific subset of it with some quirks). - Cody ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32982/#review83674 ----------------------------------------------------------- On June 26, 2015, 7:53 p.m., Michael Park wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32982/ > ----------------------------------------------------------- > > (Updated June 26, 2015, 7:53 p.m.) > > > Review request for mesos, Alexander Rukletsov, Jie Yu, and Timothy Chen. > > > Bugs: MESOS-2205 > https://issues.apache.org/jira/browse/MESOS-2205 > > > Repository: mesos > > > Description > ------- > > See summary. > > > Diffs > ----- > > docs/reservation.md PRE-CREATION > > Diff: https://reviews.apache.org/r/32982/diff/ > > > Testing > ------- > > Documentation. > > > Thanks, > > Michael Park > >