|
Version: 7C
HC7 Build: 7.00.0012 and later
API Build: 1.00.0001 and later
Domain Manager - GetWebsites retrieves all websites under a specified owner. This web service call can be made as http://your-domain.com/HC7API/DomainManager.asmx?op=GetWebsites.
Input Parameters
HostUserName
HostPassword
OwnerName - user name whose websites you want to retrieve, can be set to Host Name for getting all records
OptionalParam
Platform
WebsiteName - search filter
DomainType Webites/SubDomains - filter domains according to provided value
ServerName filter websites of a specified server
Language
Output Parameters
WebsiteID - a unique identification number assigned to each website
WebsiteName
Creator - Reseller Name, returned if OwnerName parameter is set to Host Name
Owner - Webadmin Name, returned if OwnerName parameter is set to Reseller Name
IPBased True/False - Depends upon site is IP Based or Name Based
IPAddress - IPAddress of website in case site is IP Based
PlanName - SoldPlan instance name under which website is created
PlanCreationDate - SoldPlan Creation date under which website is created
ServerName - name of the sever on which website is physically created
ServerIP - IP of the sever on which website is physically created
Sample Optional Parameters
<Parameters>
<Parameter Name = "Platform">Windows</Parameter>
<Parameter Name = "WebsiteName">MyDomain.com</Parameter>
<Parameter Name = "ServerName">abc</Parameter>
<Parameter Name = "Language">French</Parameter>
</Parameters>
Sample SOAP Request
POST /HC7API/DomainManager.asmx HTTP/1.1
Host: your-domain.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/GetWebsites"
<?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>
<GetWebsites xmlns="http://tempuri.org/">
<HostUserName>host</HostUserName>
<HostPassword>host123</HostPassword>
<OwnerName>david</OwnerName>
<OptionalParam>xml</OptionalParam>
</GetWebsites>
</soap:Body>
</soap:Envelope>
Sample HTTP Request
POST /HC7API/DomainManager.asmx/GetWebsites HTTP/1.1
Host: your-domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
HostUserName=host&HostPassword=host123&OwnerName=david&OptionalParam=xml
Sample C# Code
public DomainManager.Response GetWebsites(string strHostUserName, string strHostPassword, string strOwnerName)
{
try
{
DomainManager.DomainManager oDomain = new DomainManager.DomainManager();
DomainManager.Response oResponse = new DomainManager.Response();
XmlDocument oDoc = new XmlDocument();
//Adding root node
XmlNode xOptionalParam = oDoc.CreateNode(XmlNodeType.Element,"Parameters","");
//Adding sub nodes
XmlNode xParameter = oDoc.CreateNode(XmlNodeType.Element,"Parameter","");
XmlAttribute xAttribute = oDoc.CreateAttribute("Name");
xAttribute.Value = "Platform";
xParameter.Attributes.Append(xAttribute);
xParameter.InnerText = "Windows";
xOptionalParam.AppendChild(xParameter);
.......
.......
.......
oResponse = oDomain.GetWebsites(strHostUserName, strHostPassword, strOwnerName,
OptionalParam);
}
catch
{
}
return oResponse;
}
Sample Response
<Response>
<Method>GetWebsites</Method>
<Status>true</Status>
<ErrorCode>74900001</ErrorCode>
<ErrorDescription>Operation completed successfully.</ErrorDescription>
<Result>
<Websites xmlns="">
<RecordCount>3</RecordCount>
<RecordRow>
<WebsiteID>1578</WebsiteID>
<WebsiteName>MyDomain.com</WebsiteName>
<Owner>john</Owner>
<IPBased>True</IPBased>
<IPAddress>127.0.0.1</IPAddress>
<ServerName>abc</ServerName>
<ServerIP>127.0.0.1</ServerIP>
<PlanName>MyPlan</PlanName>
<PlanCreationDate>Jun 14, 2007</PlanCreationDate>
</RecordRow>
.......
.......
.......
</Websites>
</Result>
</Response>