create api with testing