rest api service optimized