Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jopnick on github.
  • I am jopnick ( on keybase.
  • I have a public key ASBJ19k3IdwX0-s0j9Ft-0G7vZZ-YoenOQtpPdmP-U-iKQo

To claim this, I am signing this object:

Task Oriented API's

An immediate challenge when moving from an JSON RPC API to a Hypermedia API is how to deal with complex objects.

With an RPC API, the expectation is closer to a batch processing system then a RESTful one. The object structure, including nested and complex types, is pre-communicated through documentation, and is passed as a single job, or entity to be processed in one fell swoop. This has many advantages when doing batch jobs, between servers.

For our example, we'll evaluate an invoicing system which creates new invoices with an arbitrary number of line-items. Each of these line items can be of differing, specific types. Since we <3 FQDN, we'll use as our domain. To start, we'll examine a familiar JSON RPC example.