New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal for New and Improved Remote API #5893
Comments
Sounds like something core team should comment on @shykes @crosbymichael @vieux @CrEaK |
+1, #7669 is related to this, I propose a json schema in the http://swagger.io/ format would be great. Allows you to take advantage of the existing tooling (UI, editor, try calls from the browser, validation, etc) |
RE 1: I would let the intent of the call be reflected in the HTTP method, not so much the requirement of a body. So GETs should only "get" stuff, not have side effects. Also, the path should not include the "method" if it is implied by the method, even further: the path shouldn't include verbs at all. So to create a container, I would do a POST to /containers, not a post to /containers/create. An interesting one is starting containers, we could "post" a command in "json" form to a container, but that would seriously make it annoying to "explore" the API. Maybe "POST" to a /container/{id}/startRequest path. I think the apigee API book is really good at giving a consistent approach to designing web APIs. |
See also #13240 which cites the following additional issues:
|
Still an issue. |
Does #31842 (comment) superseed your expectation of usin JSON Schema? |
closing as this one seems stalled |
The current Remote API has a number issues (#5722, #5278, #2786, #3037, #1011, #3622, #2949, etc) that make it award to use. I propose that the following issues be addressed in a new version of the API. This new API will breaking but I believe going forward the benefit of these changes will outweigh the cost IMHO.
I have started a new repository wiki page to track this proposal. I have also done a first take on revamping the List Containers request and would love feedback.
https://github.com/saden1/docker-api/wiki/List-Containers
Is this something the docker team is interested in doing?
The text was updated successfully, but these errors were encountered: