Improved rest api.