How best do you represent a bi-directional sync in a REST api?
- by Edward M Smith
Assuming a system where there's a Web Application with a resource, and a reference to a remote application with another similar resource, how do you represent a bi-directional sync action which synchronizes the 'local' resource with the 'remote' resource?
Example:
I have an API that represents a todo list.
GET/POST/PUT/DELETE /todos/, etc.
That API can reference remote TODO services.
GET/POST/PUT/DELETE /todo_services/, etc.
I can manipulate todos from the remote service through my API as a proxy via
GET/POST/PUT/DELETE /todo_services/abc123/, etc.
I want the ability to do a bi-directional sync between a local set of todos and the remote set of TODOS.
In a rpc sort of way, one could do
POST /todo_services/abc123/sync/
But, in the "verbs are bad" idea, is there a better way to represent this action?