Article ID: 3340, created on Nov 30, 2007, last review on Apr 18, 2012

  • Applies to:
  • H-Sphere

Resolution

Actions supported by XML API are grouped by services:

  • Admin Services - basic admin services: adding new accounts, etc.
  • User Services - basic user services: getting account information
  • Domain Services - creating/deleting domains and subdomains
  • Web Services - managing Web options
  • FTP Services - managing FTP options
  • User FTP Services - managing user FTP resources: subusers, passwors, etc.
  • DNS Services - managing DNS
  • Mail Services - creating/deleting mailboxes, mailing lists, autoresponders, mail forwards, etc.
  • MySQL Services - managing MySQL databases and users
  • PostgreSQL Services - managing PostgreSQL databases and users
  • MSSQL Services - managing MSSQL databases and users
  • Support Services - managing trouble tickets (H-Sphere support center)
  • Migration Services - migrating users and resellers by means of corresponding XML forms
  • PGP Services - PGP encryption/decryption in H-Sphere trouble tickets

See the up-to-date XML API services documentation generated by Javadoc tool.

Each XML request/response message is wrapped into a SOAP envelope:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
...
</soapenv:Envelope>

Inside the SOAP envelope, message body is enclosed into the <soapenv:Body> tag:

<soapenv:Body>
. . .
</soapenv:Body>

Later in the H-Sphere XML API documentation, only the SOAP message body is considered.

Inside the SOAP body, operations are defined as follows:

<ns1:deleteDomain soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="DomainServices">

Here:

  • ns1:deleteDomain is an operation;
  • xmlns:ns1="DomainServices" is its service.

Then, the operation parameters are listed:

<domain xsi:type="xsd:string">domain.comt</domain>

Here:

  • domain is a parameter's name;
  • xsi:type="xsd:string" defines the parameter's type.
  • More on supported types

  • xsi:nil="true" - this attribute is set to true if the parameter can take the null value.

Complex value definition:

<at href="#id0"/>

where:

  • at is a parameter's name
  • href="#id0" - refers to the value of the parameter defined elsewhere in this XML body within the respective multiRef construction, with id0 as its reference identifier.

The list of parameters with reference idenfifier id0:

<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:AuthToken" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:DomainServices">
   <accountId xsi:type="xsd:int">0</accountId>
   <login xsi:type="xsd:string">www_user</login>
   <password xsi:type="xsd:string">somepasswd</password>
   <role xsi:type="ns2:Role" xsi:nil="true"/>
</multiRef>

where:

  • multiRef id="id0" - defines the list of parameters refered to as id0
  • xsi:type="ns2:AuthToken" - the multiRef's Bean type

Fields are defined in the same way as the operation's parameters. multiRefs can be nested.

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF