[WIP] add json rest api

- [x] executeJSON func, wrapper for returning json
- [x] return model list
- [x] return metadata
- [x] REST API, GET
- [x] REST API, POST
- [x] unit test for above functions