Refactored Api

- /resource only endpoint
- tests enhanced