til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

Notes on RESTful API Design

This is a list of return codes in relation to a RESTful API design.

Some of the operations has more that one outcome, so you need to decide on what you find the most appropriate one.

</td>
OperationHTTP MethodSTATUS CODE ON SUCCESS
CreatePOST201 Created
202 Accepted
ReadGET200 OK
UpdatePUT200 OK
204 No Content
PATCH200 OK
204 No Content
DeleteDELETE200 OK
202 Accepted
204 No Content
</td>
OperationHTTP MethodSTATUS CODE ON ERROR
CreatePOST409 Conflict
422 Unprocessable Content
ReadGET404 Not Found
UpdatePUT404 Not Found
409 Conflict
PATCH404 Not Found
DeleteDELETE404 Not Found