creating the api and adding integration test