SWsoft SiteBuilder Integration API v3.2 Reference

SiteWebService.GetSites Method 

 [This is preliminary documentation and subject to change.]

Get a part of a sorted list of sites

[C#]
public TotalListOfSiteValue GetSites(
   int pos,
   int count,
   SelectType select,
   SortType sortType,
   SortDirection sortDirection,
   bool flagOnlyPublished
);

Parameters

pos
Start position
count
Maximum number of sites to return (can't exceed PAGE_SIZE_MAX)
select
Type of filter on site list
sortType
Field to sort by
sortDirection
Sort direction
flagOnlyPublished
If true - returns only sites that were successfully published at least once. Otherwise, returns all sites fits to filter

Return Value

Value object represents a sorted list of SiteValue with total counter

Example SOAP 1.1

Request
POST /ServiceFacade/version_3_2/SiteWebService.asmx HTTP/1.1
Host: sitebuilder.swsoft.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://swsoft.com/SiteBuilder/SiteService/v_3_2/GetSites"

<?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/SiteBuilder/SiteService/v_3_2">
      <Login>string</Login>
      <Password>string</Password>
    </CredentialsSoapHeader>
  </soap:Header>
  <soap:Body>
    <GetSites xmlns="http://swsoft.com/SiteBuilder/SiteService/v_3_2">
      <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>
    </GetSites>
  </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>
    <GetSitesResponse xmlns="http://swsoft.com/SiteBuilder/SiteService/v_3_2">
      <GetSitesResult>
        <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>
      </GetSitesResult>
    </GetSitesResponse>
  </soap:Body>
</soap:Envelope>

See Also

SiteWebService Web Service | Web services