added example of restful api