added /api routes and integration tests
added api integration tests