generalize getM
generalize restful api