diff --git a/sections/designRules.md b/sections/designRules.md index 95403e7..8b7b979 100644 --- a/sections/designRules.md +++ b/sections/designRules.md @@ -130,16 +130,17 @@ A resource that corresponds to a single conceptual entity is referred to as a [= Although the REST architectural style does not impose a specific protocol, REST APIs are typically implemented using HTTP [[rfc9110]]. -
Only apply standard HTTP methods
The set of methods allowed is determined per target resource. If an optional HTTP request method is sent to a server and the server does not support that HTTP method for the target resource, an HTTP status code 405 Method Not Allowed
shall be returned and a list of allowed methods for the target resource shall be provided in the Allow
header in the response as stated in RFC 9110 15.5.6.
Delete | Remove a resource with the given [=URI=]. | |
HEAD |
+ Read | +Retrieve metadata of a resource representation for the given [=URI=]. | +
CONNECT |
+ Read | +Setup a tunnel for securely manipulating resources for the given [=URI=]. | +
OPTIONS |
+ Read | +Retrieve available operations on a resource for the given [=URI=]. | +
TRACE |
+ Read | +Retrieve an application-level loop-back of the original client request for the given [=URI=]. | +
- Request | -Description | -
---|---|
GET /rijksmonumenten |
- Retrieves a list of national monuments. | -
GET /rijksmonumenten/12 |
- Retrieves an individual national monument. | -
POST /rijksmonumenten |
- Creates a new national monument. | -
PUT /rijksmonumenten/12 |
- Modifies national monument #12 completely. | -
PATCH /rijksmonumenten/12 |
- Modifies national monument #12 partially. | -
DELETE /rijksmonumenten/12 |
- Deletes national monument #12. | -
The HTTP specification [[rfc9110]] offers a set of standard methods, where every method is designed with explicit semantics. HTTP also defines other methods, e.g. HEAD
, OPTIONS
, TRACE
, and CONNECT
.
- The OpenAPI Specification 3.0 Path Item Object also supports these methods, except for CONNECT
.
- According to RFC 9110 9.1 the GET
and HEAD
HTTP methods MUST be supported by the server, all other methods are optional.
- In addition to the standard HTTP methods, a server may support other optional methods as well, e.g. PROPFIND
, COPY
, PURGE
, VIEW
, LINK
, UNLINK
, LOCK
, UNLOCK
, etc.
- If an optional HTTP request method is sent to a server and the server does not support that HTTP method for the target resource, an HTTP status code 405 Method Not Allowed
shall be returned and a list of allowed methods for the target resource shall be provided in the Allow
header in the response as stated in RFC 9110 15.5.6.
Request | +Description | +
---|---|
GET /rijksmonumenten |
+ Retrieves a list of national monuments. | +
GET /rijksmonumenten/12 |
+ Retrieves an individual national monument. | +
POST /rijksmonumenten |
+ Creates a new national monument. | +
PUT /rijksmonumenten/12 |
+ Modifies national monument #12 completely. | +
PATCH /rijksmonumenten/12 |
+ Modifies national monument #12 partially. | +
DELETE /rijksmonumenten/12 |
+ Deletes national monument #12. | +
The HTTP specification [[rfc9110]] offers a set of standard methods, where every method is designed with explicit semantics.
+ The OpenAPI Specification 3.0 Path Item Object also supports these methods, except for CONNECT
.
+
In addition to the standard HTTP methods, a server may support other optional methods as well, e.g. PROPFIND
, COPY
, PURGE
, VIEW
, LINK
, UNLINK
, LOCK
, UNLOCK
, etc.
+