Rest APIs

- Made previous created API's more strict
- Added REST API functionality for:
  - app API
  - tenant API