Imagine we have resources like
reports. We have a collection because every report contains its own settings to build some data.
Every report calculates its values on regular basis but not to often. There is a possibility to recalculate a report just right now to have the most actual data.
The question is: what kind of request would be a most RESTfull way to do that ?
Some details after getting first answers:
This "recalculation" takes relatively a lot of time. So this cannot be a
GET request because it cannot be finished more or less synchronously. And aim of the API client is not to get a result but start this refreshing process.
Another example. Imagine we have a database of people and a relatively big collection of filters every of them calculates demographics basing on some criteria. Conditions are:
- It is very expensive to recalculate these filters
- Only a few of filters should really deliver up-to-date calculation regularly and only client knows which ones
- Client drives massive changes to the people's table, so only client knows when it hapens and when it makes more sense to run new calculation