REST is often seen as an alternative to RPC APIs, or “Remote Procedure Call” APIs. At root, the difference as described by Wikipedia is that RPC is about telling an application to do something while REST is about changing the state of the resources of an application.
- Clients have to read documentation to know the locations of top-level resources.
- Clients have to concatenate strings to get to the next resource.
- You have an “API/Key/Token” in a header or a url.
- You have a version string in a url.
All this made me think about possible changes to become RESTful. Things seem to be easy when you’re offering operations to resources you own or control. When you’re dealing with processes that’s a whole different story. As @esjewett best puts it:
Well, to be fair, processes are kind of awkward. You’d probably have to have another resource.
Let’s see what can be changed and how…