Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

API: Some Swarm response status codes are different from Docker response status codes #1929

Closed
allencloud opened this issue Mar 5, 2016 · 3 comments · Fixed by #1933
Closed

Comments

@allencloud
Copy link
Contributor

Hi, All:

Recently I found that swarm response status codes are not completely the same as docker native api response status code. For example:

When I do a request POST /volumes/create, swarm returns a response of 200, while docker will return 201. This kind of incompatible issue exists in lots of Swarm APIs.

I think it's not so good for swarm which aims at supporting totally compatible APIs with docker.

WDYT, my friend. I will do something to change this case.

@nishanttotla
Copy link
Contributor

@allencloud thanks for reporting. It would be great if you could briefly list down all such endpoints, so that we can address them individually.

Also, we're moving to a new client for Swarm (#1879) which will also likely address some of these issues.

@allencloud
Copy link
Contributor Author

@nishanttotla
Actually, I am on the listing work. :)

During the list process, I found that we could better some api response status code in github.com/docker/docker as well, such as DELETE networks should return 204 instead of 200 in docker/docker.

moby/moby#20976
moby/moby#20977

Wish to discuss more here, as in this part swarm and docker have some difference.

@allencloud
Copy link
Contributor Author

moby/moby#20977
this pr has been merged into docker-master.
So delete network return a status code of 204.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants