|
Version: 7C
HC7 Build: 7.00.0012 and later
API Build: 1.00.0001 and later
Domain Manager - GetWebsiteProperties retrieves properties of a specified website. This web service call can be made as http://your-domain.com/HC7API/DomainManager.asmx?op=GetWebsiteProperties.
Input Parameters
HostUserName
HostPassword
OwnerName - owner name of website whose properties you want to retrieve
WebsiteName - name of website whose properties you want to retrieve
OptionalParam
Language
Output Parameters
Creator - Reseller Name, returned if OwnerName parameter is set to Host Name
Owner - Webadmin Name, returned if OwnerName parameter is set to Reseller Name
DomainStatus - Running/Paused/Stopped
IPAddress - IPAddress of website
WebsiteResources - XML Packet containing resources consumed by the website
Sample Optional Parameters
<Parameters>
<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/GetWebsiteProperties"
<?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>
<GetWebsiteProperties xmlns="http://tempuri.org/">
<HostUserName>host</HostUserName>
<HostPassword>host123</HostPassword>
<OwnerName>david</OwnerName>
<WebsiteName>MyDomain.com</WebsiteName>
<OptionalParam>xml</OptionalParam>
</GetWebsiteProperties>
</soap:Body>
</soap:Envelope>
Sample HTTP Request
POST /HC7API/DomainManager.asmx/GetWebsiteProperties HTTP/1.1
Host: your-domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
HostUserName=host&HostPassword=host123&OwnerName=david&WebsiteName=MyDomain&OptionalParam=xml
Sample C# Code
public DomainManager.Response GetWebsiteProperties(string strHostUserName, string strHostPassword, string strOwnerName, string strWebsiteName)
{
try
{
DomainManager.DomainManager oDomain = new DomainManager.DomainManager();
DomainManager.Response oResponse = new DomainManager.Response();
oResponse = oDomain.GetWebsiteProperties(strHostUserName, strHostPassword, strOwnerName,
strWebsiteName, null);
}
catch
{
}
return oResponse;
}
Sample Response
<Response>
<Method>GetWebsiteProperties</Method>
<Status>true</Status>
<ErrorCode>74900001</ErrorCode>
<ErrorDescription>Opration completed successfully.</ErrorDescription>
<Result>
<WebsiteProperties xmlns="">
<Creator>john</Creator>
<DomainStatus>Running</DomainStatus>
<IPAddress>127.0.0.1</IPAddress>
<WebsiteResources>
<RecordRow>
<ResourceID>5</ResourceID>
<ResourceName>Mail Domains</ResourceName>
<Consumed>Yes</Consumed>
</RecordRow>
<RecordRow>
<ResourceID>6</ResourceID>
<ResourceName>POP Boxes per Mail Domain</ResourceName>
<Consumed>1</Consumed>
</RecordRow>
<RecordRow>
<ResourceID>7</ResourceID>
<ResourceName>Bandwidth (MB)</ResourceName>
<Consumed>50</Consumed>
</RecordRow>
.......
.......
.......
</WebsiteResources>
</WebsiteProperties>
</Result>
</Response>