To REST or not to REST

Yesterday @esjewett pointed out that tarpipe‘s API 2.0 might not be considered RESTful. Quoting the previously written article “A RESTful ESME API“:

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.

  1. Clients have to read documentation to know the locations of top-level resources.
  2. Clients have to concatenate strings to get to the next resource.
  3. You have an “API/Key/Token” in a header or a url.
  4. 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…

Advertisements

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s