add validation to rest service
add rest service tests
Merge pull request #41 from CapillarySoftware/improve_rest

Improve rest