# Idempotent REST APIs ![rw-book-cover](https://restfulapi.net/wp-content/uploads/rest.png) URL:: https://restfulapi.net/idempotent-rest-apis Author:: REST API Tutorial ## Highlights > In the context of REST APIs, when making multiple identical requests has the same effect as making a single request – then that REST API is called **idempotent**. ([View Highlight](https://read.readwise.io/read/01fy6fm6sgn70f84xgkca11zj1)) > We have to make our APIs ***fault-tolerant*** in such a way that the duplicate requests do not leave the system unstable. ([View Highlight](https://read.readwise.io/read/01fy6fmqhsr3384g6j8nc9qkw9)) > An idempotent HTTP method is a method that can be invoked many times without the different outcomes. It should not matter if the method has been called only once, or ten times over. The result should always be the same. > **Idempotency** essentially means that the result of a successfully performed request is independent of the number of times it is executed. > For example, in arithmetic, adding zero to a number is an idempotent operation. ([View Highlight](https://read.readwise.io/read/01fy6fn5385nerqabcws0cvd5s)) > If we follow the REST principles in designing our APIs, we will have automatically **idempotent REST APIs** for GET, PUT, DELETE, HEAD, OPTIONS, and TRACE methods. *Only `POST` APIs will not be idempotent*. ([View Highlight](https://read.readwise.io/read/01fy6fnn6h49s31cy6fybv5fk6)) --- Title: Idempotent REST APIs Author: REST API Tutorial Tags: readwise, articles date: 2024-01-30 --- # Idempotent REST APIs ![rw-book-cover](https://restfulapi.net/wp-content/uploads/rest.png) URL:: https://restfulapi.net/idempotent-rest-apis Author:: REST API Tutorial ## AI-Generated Summary In the context of REST, when making multiple identical requests has the same effect as making a single request – then the REST API is called idempotent. ## Highlights > In the context of REST APIs, when making multiple identical requests has the same effect as making a single request – then that REST API is called **idempotent**. ([View Highlight](https://read.readwise.io/read/01fy6fm6sgn70f84xgkca11zj1)) > We have to make our APIs ***fault-tolerant*** in such a way that the duplicate requests do not leave the system unstable. ([View Highlight](https://read.readwise.io/read/01fy6fmqhsr3384g6j8nc9qkw9)) > An idempotent HTTP method is a method that can be invoked many times without the different outcomes. It should not matter if the method has been called only once, or ten times over. The result should always be the same. > **Idempotency** essentially means that the result of a successfully performed request is independent of the number of times it is executed. > For example, in arithmetic, adding zero to a number is an idempotent operation. ([View Highlight](https://read.readwise.io/read/01fy6fn5385nerqabcws0cvd5s)) > If we follow the REST principles in designing our APIs, we will have automatically **idempotent REST APIs** for GET, PUT, DELETE, HEAD, OPTIONS, and TRACE methods. *Only `POST` APIs will not be idempotent*. ([View Highlight](https://read.readwise.io/read/01fy6fnn6h49s31cy6fybv5fk6))