Returns a list of details of sites that match the search criteria.
[C#] public TotalListOfSiteValue FindSites( string criteria, int pos, int count, SelectType select, SortType sortType, SortDirection sortDirection, bool flagOnlyPublished );
null or empty, then no filtering is applied.true, the method returns only sites that were successfully published at least once. Otherwise, it returns all sites that fit the filtering rules.A list of SiteValue that contains the search results.
criteria string is splitting into words. The delimeters are standard whitespace characters: space, tabs, CR, LF.
The result of a search is a list of the sites, with Alias (also known as "Site name" in the web interface) or the site owner full name (FirstName + LastName) properties contains at least one of the words from the criteria.
Additionally the sites are filtered according select parameter (see SelectType) and sorted as described by sortType and sortDirection. The size of the result list are limited by pos and count.
| Role | Access/rights description |
|---|---|
| Administrator | Unrestricted access to all sites in the system. |
| Reseller | Unrestricted access to the sites owned by the accounts of the reseller accounts tree (includes the reseller itself). Note: an owner of the trial site is an administrator or a reseller. |
| SiteOwner | Unrestricted access to the sites owned by the site owner account. |
| Anonymous user | No access. SOAP fault detail SWsoft.SiteBuilder.BO.Facade.SecurityException will be returned. |
| Request |
|---|
POST /wsb/ServiceFacade/4.1/SiteWebService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://swsoft.com/webservices/sb/4.1/SiteService/FindSites"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<CredentialsSoapHeader xmlns="http://swsoft.com/webservices/sb/4.1/SiteService">
<SsoSessionId>string</SsoSessionId>
<SsoId>string</SsoId>
<Login>string</Login>
<Password>string</Password>
</CredentialsSoapHeader>
</soap:Header>
<soap:Body>
<FindSites xmlns="http://swsoft.com/webservices/sb/4.1/SiteService">
<criteria>string</criteria>
<pos>int</pos>
<count>int</count>
<select>All or MyTree or MyOnly or AnonymousOnly or TrialSites</select>
<sortType>Alias or Type or Status or IsActive or Owner or Reseller or IsPublished or CreationDate</sortType>
<sortDirection>Ascending or Descending</sortDirection>
<flagOnlyPublished>boolean</flagOnlyPublished>
</FindSites>
</soap:Body>
</soap:Envelope> |
| Response |
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<FindSitesResponse xmlns="http://swsoft.com/webservices/sb/4.1/SiteService">
<FindSitesResult>
<TotalCount>int</TotalCount>
<Items>
<SiteValue>
<Id>string</Id>
<Alias>string</Alias>
<OwnerId>string</OwnerId>
<OwnerUserName>string</OwnerUserName>
<IsActive>boolean</IsActive>
<PublishingSettings xsi:nil="true" />
<LastPublishingSettings xsi:nil="true" />
<HostId>string</HostId>
<ResellerId>string</ResellerId>
<ResellerUserName>string</ResellerUserName>
<CreationDate>dateTime</CreationDate>
</SiteValue>
<SiteValue>
<Id>string</Id>
<Alias>string</Alias>
<OwnerId>string</OwnerId>
<OwnerUserName>string</OwnerUserName>
<IsActive>boolean</IsActive>
<PublishingSettings xsi:nil="true" />
<LastPublishingSettings xsi:nil="true" />
<HostId>string</HostId>
<ResellerId>string</ResellerId>
<ResellerUserName>string</ResellerUserName>
<CreationDate>dateTime</CreationDate>
</SiteValue>
</Items>
</FindSitesResult>
</FindSitesResponse>
</soap:Body>
</soap:Envelope> |