magic rest client