Rest api definition