Rest APIs

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

Can you update this function in the CasperJS util file as well?