Creates hosts for a specified IP addresses (if there are no hosts linked to the IP address) and then add the hosts to a plan of an account specified by username.
[C#] public PlanHostResult[] AddHostsAsIpAddressesToAccountPlan( string accountId, string[] ipAddresses );
Only administrators and resellers are allowed to use this method. New hosts are created for a user specified in SOAP-header (see CredentialsSoapHeader). The account specified by accountId must belong to the accounts subtree of the user specified in SOAP-header. If the account login is same as the user's login, then no plan modifications occurs, only the host processing will be executed. The hosts are added to all plans recursively: from the plan of the account specified by accountId upto all child plans of the user specified by SOAP-header.
| Request |
|---|
POST /wsb/ServiceFacade/4.1/PlanWebService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://swsoft.com/webservices/sb/4.1/PlanService/AddHostsAsIpAddressesToAccountPlan"
<?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/PlanService">
<SsoSessionId>string</SsoSessionId>
<SsoId>string</SsoId>
<Login>string</Login>
<Password>string</Password>
</CredentialsSoapHeader>
</soap:Header>
<soap:Body>
<AddHostsAsIpAddressesToAccountPlan xmlns="http://swsoft.com/webservices/sb/4.1/PlanService">
<accountId>string</accountId>
<ipAddresses>
<string>string</string>
<string>string</string>
</ipAddresses>
</AddHostsAsIpAddressesToAccountPlan>
</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>
<AddHostsAsIpAddressesToAccountPlanResponse xmlns="http://swsoft.com/webservices/sb/4.1/PlanService">
<AddHostsAsIpAddressesToAccountPlanResult>
<PlanHostResult>
<IPAddress>string</IPAddress>
<ResultCode>UnknownError or Found or Added or Invalid or NotFound or AccessDenied</ResultCode>
<HostId>string</HostId>
</PlanHostResult>
<PlanHostResult>
<IPAddress>string</IPAddress>
<ResultCode>UnknownError or Found or Added or Invalid or NotFound or AccessDenied</ResultCode>
<HostId>string</HostId>
</PlanHostResult>
</AddHostsAsIpAddressesToAccountPlanResult>
</AddHostsAsIpAddressesToAccountPlanResponse>
</soap:Body>
</soap:Envelope> |