Improvement and fix of Rest interface