Tidy up the ReST API

The ReST API needs 4 object types.  Create these as separate files.

Change-Id: I108fd6b8c81f4f94c5782b5eebe8c6aa998bec96