generate menus by api