Changes to REST endpoints and minor changes to tests.