code: @RequestMapping(value = "/portlets.json", method = RequestMethod.GET)
      public ModelAndView getManageablePortlets(
              HttpServletRequest request, HttpServletResponse response) throws Exception {
          // get a list of all channels
          List<IPortletDefinition> allPortlets = portletDefinitionRegistry.getAllPortletDefinitions();
          IAuthorizationPrincipal ap = getAuthorizationPrincipal(request);
  
          List<PortletTuple> rslt = new ArrayList<PortletTuple>();
          for (IPortletDefinition pdef : allPortlets) {
              if (ap.canManage(pdef.getPortletDefinitionId().getStringId())) {
                  rslt.add(new PortletTuple(pdef));
              }
          }
  
          return new ModelAndView("json", "portlets", rslt);
      }
docs: Provides information about all portlets in the portlet registry. NOTE: The response is
  governed by the <code>IPermission.PORTLET_MANAGER_xyz</code> series of permissions. The
  actual level of permission required is based on the current lifecycle state of the portlet.