API Tests and new REST-API Documentation

Fixes in api tests to be compatible with the latest API changes.
Also fixes RESTful API documentation