implement rest api controller for dynamic server