prepare rest resource