create base api method