sample usage for restful API