This document provides a cheat sheet for HTTP response codes that may be returned for different conditions in a REST API. It shows how the status code depends on whether the HTTP method, path, and parameters are valid. Common codes include 200 for success, 400 for bad request due to invalid parameters, 403 for forbidden actions, and 404 for objects that cannot be found.
1 of 1
Downloaded 135 times
More Related Content
REST HTTP Response Codes Cheat Sheet
1. REST HTTP Response Code Cheat Sheet
HTTP Request Method HTTP Path Parameters
GET | POST | ... /api/user/register ?username=joe&email=...
Method correct? Path correct? Parameters valid?
no yes no yes yes no
yes yes
400 Method allowed? 404 Object / Action
requested allowed?
400
no no
403
200
HTTP Status Codes
200 Ok
400 Bad Request
403 Forbidden
404 Not found
@author Markus Tacker <m.tacker@global-media.de> 息 2009 Global Media GmbH
@version $Id: REST-Response-Codes-Cheat-Sheet.svg 68 2009-08-18 10:01:14Z tacker $
http://www.global-group.de/
All rights reserved.