REST API design: Tell the server to "refresh" a set of resources

Viewed 8399

We have some resources on a REST server structured like this:

  • /someResources/foo
  • /someResources/bar
  • /someResources/baz

where someResource is a server representation of a distributed object far away.

We want to tell the server to "refresh" its representation of that "distributed object" by looking at it out in the network & updating the server's cache i.e. we can not simply PUT the new value.

What is the clean REST way to this ?

a) Is it to POST to a /refreshes/ a new "refresh request" ?

b) Is it to PUT (with a blank document) to http://ip/someResources ?

c) Something else ?

I like (a) as it will give us an id to identify & track the refresh command but worried that we are creating too many resources. Any advice?

2 Answers
Related