Implement restore endpoint