REST API framework and channels API implementation

Fixes #9