Rest APIs

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

Can you do a grep for `/?` and replace all of the matches with `?`. In a few calls throughout this PR the slash shouldn't be preceeding the `?` for consistency.