[jira] [Commented] (MESOS-3914) Make request format consistent across endpoints
[ https://issues.apache.org/jira/browse/MESOS-3914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15257143#comment-15257143 ] Vinod Kone commented on MESOS-3914: --- Moved some of the tickets from this epic to the Operator API v1 epic. MESOS-4791 > Make request format consistent across endpoints > --- > > Key: MESOS-3914 > URL: https://issues.apache.org/jira/browse/MESOS-3914 > Project: Mesos > Issue Type: Epic > Components: master >Reporter: Alexander Rukletsov > Labels: http, mesosphere, tech-debt > > We are inconsistent with the format of requests we expect for operator > endpoints. For example, dynamic reservations take a string > "slaveId={{}}={{}}", while maintenance > expects a {{JSON}} object representing {{maintenance::Schedule}} protobuf > directly. > We agreed to accept single {{JSON}} objects and provide a corresponding > {{*Request}} protobuf to document the schema, leverage HTTP verbs where > appropriate. Next steps are: > * document how Mesos HTTP operator endpoints should be implemented; > * convert all nonconformant endpoints via a deprecation cycle. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3914) Make request format consistent across endpoints
[ https://issues.apache.org/jira/browse/MESOS-3914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15100798#comment-15100798 ] Marco Massenzio commented on MESOS-3914: Totally agree - good point. > Make request format consistent across endpoints > --- > > Key: MESOS-3914 > URL: https://issues.apache.org/jira/browse/MESOS-3914 > Project: Mesos > Issue Type: Epic > Components: master >Reporter: Alexander Rukletsov > Labels: http, mesosphere, tech-debt > > We are inconsistent with the format of requests we expect for operator > endpoints. For example, dynamic reservations take a string > "slaveId={{}}={{}}", while maintenance > expects a {{JSON}} object representing {{maintenance::Schedule}} protobuf > directly. > We should agree on the input: either we expect a string with key-value pairs, > where values can be {{JSON}} objects, or we request {{JSON}} directly. > Once we agree on the approach, we should document the outcome and convert all > nonconformant endpoints via a deprecation cycle. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3914) Make request format consistent across endpoints
[ https://issues.apache.org/jira/browse/MESOS-3914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008818#comment-15008818 ] Jan-Philip Gehrcke commented on MESOS-3914: --- {quote} either we expect a string with key-value pairs, where values can be JSON objects, or we request JSON directly. {quote} The first option is not valid: The {{Content-Type}} header usually has a strong meaning and we should respect this here, too. If the input is sent URL-encoded with the {{Content-Type}} header set to {{application/x-www-form-urlencoded}}, then curly and square brackets (for transferring a JSON object) are not allowed in the string, as of http://tools.ietf.org/html/rfc1738 (page 2). The input should be transferred using the {{application/json}} content type -- in which case the body should be valid JSON object in compliance with http://www.ietf.org/rfc/rfc4627.txt. > Make request format consistent across endpoints > --- > > Key: MESOS-3914 > URL: https://issues.apache.org/jira/browse/MESOS-3914 > Project: Mesos > Issue Type: Improvement > Components: master >Reporter: Alexander Rukletsov > Labels: mesosphere, tech-debt > > We are inconsistent with the format of requests we expect for operator > endpoints. For example, dynamic reservations take a string > "slaveId={{}}={{}}", while maintenance > expects a {{JSON}} object representing {{maintenance::Schedule}} protobuf > directly. > We should agree on the input: either we expect a string with key-value pairs, > where values can be {{JSON}} objects, or we request {{JSON}} directly. > Once we agree on the approach, we should document the outcome and convert all > nonconformant endpoints via a deprecation cycle. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3914) Make request format consistent across endpoints
[ https://issues.apache.org/jira/browse/MESOS-3914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15008803#comment-15008803 ] Lukas Loesche commented on MESOS-3914: -- To me what would make the most sense is if the Content-Type of the POST/PUT request is set to application/json and the body is a single JSON object. The URI might container additional parameters that determine how the operation is performed. E.g. "?force=true" to force the operation. But all data regarding the operation itself should be contained in that single JSON object. > Make request format consistent across endpoints > --- > > Key: MESOS-3914 > URL: https://issues.apache.org/jira/browse/MESOS-3914 > Project: Mesos > Issue Type: Improvement > Components: master >Reporter: Alexander Rukletsov > Labels: mesosphere, tech-debt > > We are inconsistent with the format of requests we expect for operator > endpoints. For example, dynamic reservations take a string > "slaveId={{}}={{}}", while maintenance > expects a {{JSON}} object representing {{maintenance::Schedule}} protobuf > directly. > We should agree on the input: either we expect a string with key-value pairs, > where values can be {{JSON}} objects, or we request {{JSON}} directly. > Once we agree on the approach, we should document the outcome and convert all > nonconformant endpoints via a deprecation cycle. -- This message was sent by Atlassian JIRA (v6.3.4#6332)