refine REST api