Change existing endpoints to api