Updated calls to REST api.