Hi All,
I have a question on idempotence and general API understanding.
A GET method is considered idempotent
GET /users/12345 = David
GET /users/54321 = Dino
for example
But what if my API is for say a currency pair, and the rate changes every second?
GET /currencies/audusd = $0.70857
and then 1 second later
GET /currencies/audusd = $0.70859 (changed by 2 pips from “7” to “9”)
My understanding of the only way to make this GET idempotent is to specify a timestamp for something like
GET /currencies/audusd?time=1538627424 = $0.70860
So what do we call a GET method that returns the most current value of something that is dynamic?
I’d appreciate any feedback or insight.
Cheers
David