json API for the widgets corrected