3.1.2 HTTP Standards
HTTP Methods
OBAPI resources support following HTTP methods. New services also should use these methods appropriately.
| Method | Purpose |
|---|---|
| GET | Retrieve / fetch the resource |
| POST | Create a new resource |
| PUT | Update / modify an existing resource. The payload is expected to have full resource. |
| PATCH | Update / modify very small part of an existing resource. The payload is expected to have only the fields to be updated. |
| DELETE | Delete a resource |
HTTP Response Codes
Following HTTP response codes are used. New REST services should return appropriate response code based on result of the operation.
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request successfully executed and the response has content |
| 201 | Created | Resource successfully created |
| 202 | Accepted | Request has been accepted for processing but processing has not been completed |
| 204 | No Content | Request successfully executed and the response doesn't have content |
| 304 | Not Modified | The resource has not been modified for a conditional GET request |
| 400 | Bad Request | The request could not be understood by the server due to malformed syntax |
| 401 | Unauthorized | The request requires user authentication, or authorization has been refused for the credential passed in the request |
| 404 | Not Found | The requested resource was not found |
| 500 | Internal Server Error | The server encountered an unexpected condition which prevented it from fulfilling the request |
Parent topic: REST Tier