src/Jaspersoft/Service/OrganizationService.php
public function searchOrganizations($query = null, $rootTenantId = null, $maxDepth = null, $includeParents = null,
                                       $limit = null, $offset = null)
	{
        $result = array();
        $url = self::makeUrl(null, array(
            'q' => $query,
            'rootTenantId' => $rootTenantId,
            'maxDepth' => $maxDepth,
            'includeParents' => $includeParents,
            'limit' => $limit,
            'offset' => $offset));
        $resp = $this->service->prepAndSend($url, array(200, 204), 'GET', null, true, 'application/json', 'application/json');
        if (empty($resp))
            return $result;
        $orgs = json_decode($resp);
        foreach ($orgs->organization as $org) {
            $result[] = @new Organization($org->alias,
                $org->id,
                $org->parentId,
                $org->tenantName,
                $org->theme,
                $org->tenantDesc,
                $org->tenantFolderUri,
                $org->tenantNote,
                $org->tenantUri);
        }
        return $result;
    }
public function searchOrganizations($query = null, $rootTenantId = null, $maxDepth = null, $includeParents = null,
                                       $limit = null, $offset = null)
	{
        $result = array();
        $url = self::makeUrl(null, array(
            'q' => $query,
            'rootTenantId' => $rootTenantId,
            'maxDepth' => $maxDepth,
            'includeParents' => $includeParents,
            'limit' => $limit,
            'offset' => $offset));
        $resp = $this->service->prepAndSend($url, array(200, 204), 'GET', null, true, 'application/json', 'application/json');
        if (empty($resp))
            return $result;
        $orgs = json_decode($resp);
        foreach ($orgs->organization as $org) {
            $result[] = @new Organization($org->alias,
                $org->id,
                $org->parentId,
                $org->tenantName,
                $org->theme,
                $org->tenantDesc,
                $org->tenantFolderUri,
                $org->tenantNote,
                $org->tenantUri);
        }
        return $result;
    }
public function searchOrganizations ( $ query = null , $ rootTenantId = null , $ maxDepth = null , $ includeParents = null , $ limit = null , $ offset = null ) { $ result = array ( ) ; $ url = self :: makeUrl ( null , array ( 'q' => $ query , 'rootTenantId' => $ rootTenantId , 'maxDepth' => $ maxDepth , 'includeParents' => $ includeParents , 'limit' => $ limit , 'offset' => $ offset ) ) ; $ resp = $ this -> service -> prepAndSend ( $ url , array ( 200 , 204 ) , 'GET' , null , true , 'application/json' , 'application/json' ) ; if ( empty ( $ resp ) ) return $ result ; $ orgs = json_decode ( $ resp ) ; foreach ( $ orgs -> organization as $ org ) { $ result [ ] = @ new Organization ( $ org -> alias , $ org -> id , $ org -> parentId , $ org -> tenantName , $ org -> theme , $ org -> tenantDesc , $ org -> tenantFolderUri , $ org -> tenantNote , $ org -> tenantUri ) ; } return $ result ; }
Search for organizations

Unlike the searchUsers function, full Organization objects are returned with this function.
You will receive an array with zero or more elements which are Organization objects that can be manipulated
or used with other functions requiring Organization objects.

@param string $query
@param string $rootTenantId
@param int $maxDepth
@param boolean $includeParents
@param int $limit
@param int $offset
@return array
Search for organizations