API Guidelines: Difference between revisions
Jump to navigation
Jump to search
(Created page with "* Clients must never construct URLs without a template. * Versioning should be done using Content Type Negotiation. * Resources should use HTTP...") |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
* Resources should use [[HTTP Caching]]. | * Resources should use [[HTTP Caching]]. | ||
* Relationships between resources should be modeled using [[Link Header | links]]. | * Relationships between resources should be modeled using [[Link Header | links]]. | ||
* Updates to resources should use [[Optimistic Concurrency]] using [[ETag | ETags]]. | * Updates to resources should use [[Optimistic Concurrency]] using [[ETag Header | ETags]]. | ||
* GET, DELETE and PUT must be [[idempotent]]. | * GET, DELETE and PUT must be [[idempotent]]. | ||
* [[Pagination]] should use absolute ids for offset calculation instead of relative to the first page. | * [[Pagination]] should use absolute ids for offset calculation instead of relative to the first page. | ||
* [[Media Types]] should have a description of the format to expect as well as the interactions you can make when you're viewing that resource. | * [[Media Types]] should have a description of the format to expect as well as the interactions you can make when you're viewing that resource. | ||
* The API should be explorable using a web browser. | |||
* The API should be implemented in an [[Offensive Coding]] style, it should complain loudly when it receives something it did not expect. |
Latest revision as of 09:03, 14 January 2021
- Clients must never construct URLs without a template.
- Versioning should be done using Content Type Negotiation.
- Resources should use HTTP Caching.
- Relationships between resources should be modeled using links.
- Updates to resources should use Optimistic Concurrency using ETags.
- GET, DELETE and PUT must be idempotent.
- Pagination should use absolute ids for offset calculation instead of relative to the first page.
- Media Types should have a description of the format to expect as well as the interactions you can make when you're viewing that resource.
- The API should be explorable using a web browser.
- The API should be implemented in an Offensive Coding style, it should complain loudly when it receives something it did not expect.