add test boilerplate and refactor api
really messy way of creating resources on a branch from a post request