Change all the requests to endpoints to use REST.