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
Successful requests with intended empty body should return 204 #1811
Comments
Indeed, #1808 was just fixed and should be available via
Agree, the API reponse code should 204 instead of 200 when no content is actually returned. Feel free to submit a PR for this. We'll track the evolution to 204 for requests no returning content in this issue. I'll tackle the missing resource controls type in the documentation in another PR. |
API documentation updated via #1812 Changes have been reflected on Swaggerhub. |
Info: Also empty body and 200 when updating stacks. |
Closed via #1963 |
Description
I wrote a script that creates a new stack via the portainer API.
I noticed that the stack is always public - no matter which type of user creates it.
So I tried to create a new resource control object for the stack (Yes. The documentation does not mention "stack" as a valid type...)
Steps to reproduce the issue:
Why do you consider this to be a bug?
In this request I see multiple buggy things:
What did you expect to happen instead?
Either (if "stack" is a valid type - regardeless of the swagger documentation) you can solve this by providing useful information or by changing the return code to "204 NO CONTENT" which says "[...] The server successfully processed the request and is not returning any content. [...]" or (if "stack" is an invalid type) by returning a "400 BAD REQUEST" explaining that there is inappropriate data in the request (and what is the exact problem...).
Technical details:
I would really appreciate if "stack" would be a valid type... :-)
The text was updated successfully, but these errors were encountered: