Add some tests of the REST interface in t/rest.t (wip)