We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For POST /entities, the server is expected to respond with: 200 OK if the entity was created and it's returned in the response body 204 OK if the entity was created but it is not returned in the response body 400 Bad Request if the request body can't be parsed 401 Unauthorized if the caller can't be authenticated 403 Forbidden if the caller can't create the entity 404 Not Found if the url is invalid 422 Unprocessable Entity if the request body can be parsed but it contain invalid parameters (also used when the entity to be created already exists)
For POST /entities, the server is expected to respond with:
POST /entities
200 OK
204 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
422 Unprocessable Entity
Use this section to show proper examples of API design, like:
/examples
{
400
{}
422
{"id": 1}
204
Use this section to show bad examples of API design, like:
200
409
We would be following the lead of the HTTP RFC and understanding duplicated entity as a regular validation. References:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Status responses for POST
Examples
Good
Use this section to show proper examples of API design, like:
/examples
-d{
400
/examples
-d{}
422
/examples
-d{"id": 1}
204
/examples
-d{"id": 1}
422
in the body it should explain that it's duplicatedBad
Use this section to show bad examples of API design, like:
/examples
-d{
422
/examples
-d{}
400
/examples
-d{"id": 1}
200
without body/examples
-d{"id": 1}
409
Reasoning
We would be following the lead of the HTTP RFC and understanding duplicated entity as a regular validation.
References:
The text was updated successfully, but these errors were encountered: