Revert "Revert "registration of api controllers fixed""

This reverts commit 5d659b38601b2620054b286c941a5d53f1da20ae.