Prepare basis for REST API.

To complete with work already done on Android