Implement Apps API

closes #2465
- Add new API for apps
- Add integration tests for app api
- Add new permissions for apps