Adding REST API v1.

The documentation is still in the works. I will update when it is finished.