setup api with first endpoint