A colleague referenced the Microsoft Restful API Guidelines, which require put and delete to be idempotent.
I’m more used to thinking of functional programming being idempotent. I.e., the square root of 2 is always the square root of 2, no matter how many times you calculate it.
That kind of operation is idempotent. But it’s also possible that idempotent operations will change state the first time they are executed. What is required is that subsequent operations not change state.
Put another way, there is no difference in executing an idempotent function once or a jillion times. Which is not to say that there is no difference between executing it once or never.
I believe the major constraint this imposes is that a REST-ful delete must identify its target by a locally unique ID rather than an index. And a REST-ful put must have a way of identifying a record so that attempting to add a second time is effectively a no-op.