PlanWebService.AddHostsAsIpAddressesToAccountPlan Method 

Creates hosts for a specified IP addresses (if there are no hosts linked to the IP address) and then adds the hosts to a plan of a account specified by username.

[C#]
public void AddHostsAsIpAddressesToAccountPlan(
   string username,
   string[] ipAddresses
);

Parameters

username
Account login. Hosts will be added to the plan of this account.
ipAddresses
IP addresses to be added to the Plan as hosts.

Remarks

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 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 username account's plan upto all child plans of the user specified by SOAP-header.

Example SOAP 1.1

Request
POST /wsb/ServiceFacade/Version_3_2/PlanWebService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://swsoft.com/SiteBuilder/PlanService/v_3_2/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/SiteBuilder/PlanService/v_3_2">
      <Login>string</Login>
      <Password>string</Password>
    </CredentialsSoapHeader>
  </soap:Header>
  <soap:Body>
    <AddHostsAsIpAddressesToAccountPlan xmlns="http://swsoft.com/SiteBuilder/PlanService/v_3_2">
      <username>string</username>
      <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/SiteBuilder/PlanService/v_3_2" />
  </soap:Body>
</soap:Envelope>

See Also

PlanWebService Web Service | Web services