REST implementation

Finidhed initial dev for API calls
Added intial rest calls
Fixed a bug with filtering.