Adding REST methods for ensembles

- REST api methods for ensembles
- Improving error handling in get methods
- New method returning the leaves of a model