copied rest api to separate file