code: @GET
      @Path("tree")
      public APIConnectionGroup getConnectionGroupTree(
              @QueryParam("permission") List<ObjectPermission.Type> permissions)
              throws GuacamoleException {
  
          // Retrieve the requested tree, filtering by the given permissions
          ConnectionGroupTree tree = new ConnectionGroupTree(userContext,
                  connectionGroup, permissions);
  
          // Return tree as a connection group
          return tree.getRootAPIConnectionGroup();
  
      }
docs: Returns the current connection group along with all descendants.
  
  @param permissions
  If specified and non-empty, limit the returned list to only those
  connections for which the current user has any of the given
  permissions. Otherwise, all visible connections are returned.
  ConnectionGroups are unaffected by this parameter.
  
  @return
  The current connection group, including all descendants.
  
  @throws GuacamoleException
  If a problem is encountered while retrieving the connection group or
  its descendants.