H-Sphere Developer Guide

H-Sphere XML API: PostgreSQL Services

 

Related Docs:  

H-Sphere XML API Reference

Actions:

 

Action: addUser

Description: adds a Postgres user.

Parameters:

    AuthToken:at - authentication information
    String:name - user name
    String:password - user password

Response: empty

Example:

<soapenv:Body>
<ns1:addUser soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices">
<at href="#id0"/>
<name xsi:type="xsd:string">pgtestuser1</name>
<password xsi:type="xsd:string">password1</password>
</ns1:addUser>
<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:PostgreSQLServices">
<accountId xsi:type="xsd:int">0</accountId>
<login xsi:type="xsd:string">wwwgrinia</login>
<password xsi:type="xsd:string">grinia</password>
<role xsi:type="ns2:Role" xsi:nil="true"/>
</multiRef>
</soapenv:Body>

....
<soapenv:Body>
<ns1:addUserResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices"/>

 

Action:addDB

Description: adds Postgres database.

Parameters:

    AuthToken:at - authentication information
    String:name - database name
    String:description - database description
    String:owner - database owner user

Response: empty

Example:

<soapenv:Body>
<ns1:addDB soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices">
<at href="#id0"/>
<name xsi:type="xsd:string">pgtest</name>
<description xsi:type="xsd:string">Test DB</description>
<owner xsi:type="xsd:string">pgtestuser1</owner>
</ns1:addDB>
<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:PostgreSQLServices">
<accountId xsi:type="xsd:int">0</accountId>
<login xsi:type="xsd:string">wwwgrinia</login>
<password xsi:type="xsd:string">grinia</password>
<role xsi:type="ns2:Role" xsi:nil="true"/>
</multiRef>
</soapenv:Body>
....
<soapenv:Body>
<ns1:addDBResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices"/>
</soapenv:Body>

 

Action: changeQuota

Description: changes Postgres database quota.

Parameters:

    AuthToken:at - authentication information
    String:name - database name
    String:quota - database quota

Response: empty

Example:

<soapenv:Body>
<ns1:changeQuota soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices">
<at href="#id0"/>
<name xsi:type="xsd:string">pgtest</name>
<quota xsi:type="xsd:double">75.0</quota>
</ns1:changeQuota>
<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:PostgreSQLServices">
<accountId xsi:type="xsd:int">0</accountId>
<login xsi:type="xsd:string">wwwgrinia</login>
<password xsi:type="xsd:string">grinia</password>
<role xsi:type="ns2:Role" xsi:nil="true"/>
</multiRef>
</soapenv:Body>
....
<soapenv:Body>
<ns1:changeQuotaResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices"/>
</soapenv:Body>

 

Action: changePassword

Description: changes Postgres user password.

Parameters:

    AuthToken:at - authentication information
    String:name - user name
    String:newPassword - user's new password

Response: empty

Example:

<soapenv:Body>
<ns1:changePassword soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices">
<at href="#id0"/>
<name xsi:type="xsd:string">pgtestuser1</name>
<newPassword xsi:type="xsd:string">qwerty11</newPassword>
</ns1:changePassword>
<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:PostgreSQLServices">
<accountId xsi:type="xsd:int">0</accountId>
<login xsi:type="xsd:string">wwwgrinia</login>
<password xsi:type="xsd:string">grinia</password>
<role xsi:type="ns2:Role" xsi:nil="true"/>
</multiRef>
</soapenv:Body>
...
<soapenv:Body>
<ns1:changePasswordResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices"/>
</soapenv:Body>

 

Action: changeDBDescription

Description: changes Postgres database description.

Parameters:

    AuthToken:at - authentication information
    String:name - database name
    String:description - Postgres database description

Response: empty

Example:

<soapenv:Body>
<ns1:changeDBDescription soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices">
<at href="#id0"/>
<name xsi:type="xsd:string">pgtest</name>
<description xsi:type="xsd:string">Database #1</description>
</ns1:changeDBDescription>
<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:PostgreSQLServices">
<accountId xsi:type="xsd:int">0</accountId>
<login xsi:type="xsd:string">wwwgrinia</login>
<password xsi:type="xsd:string">grinia</password>
<role xsi:type="ns2:Role" xsi:nil="true"/>
</multiRef>
</soapenv:Body>
...
<soapenv:Body>
<ns1:changeDBDescriptionResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices"/>
</soapenv:Body>

 

Action: deleteDB

Description: deletes a Postgres database.

Parameters:

    AuthToken:at - authentication information
    String:name - database name

Response: empty

Example:

<soapenv:Body>
<ns1:deleteDB soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices">
<at href="#id0"/>
<name xsi:type="xsd:string">pgtest</name>
</ns1:deleteDB>
<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:PostgreSQLServices">
<accountId xsi:type="xsd:int">0</accountId>
<login xsi:type="xsd:string">wwwgrinia</login>
<password xsi:type="xsd:string">grinia</password>
<role xsi:type="ns2:Role" xsi:nil="true"/>
</multiRef>
</soapenv:Body>
...
<soapenv:Body>
<ns1:deleteDBResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices"/>
</soapenv:Body>

 

Action: deleteUser

Description: deletes a Postgres user.

Parameters:

    AuthToken:at - authentication information
    String:name - user name

Response: empty

Example:

lt;soapenv:Body>
<ns1:deleteUser soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices">
<at href="#id0"/>
<name xsi:type="xsd:string">pgtestuser1</name>
</ns1:deleteUser>
<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:PostgreSQLServices">
<accountId xsi:type="xsd:int">0</accountId>
<login xsi:type="xsd:string">wwwgrinia</login>
<password xsi:type="xsd:string">grinia</password>
<role xsi:type="ns2:Role" xsi:nil="true"/>
</multiRef>
</soapenv:Body>
...
<soapenv:Body>
<ns1:deleteUserResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="PostgreSQLServices"/>
</soapenv:Body>

 


Related Docs:  

H-Sphere XML API Reference



© Copyright 1998-2006. Positive Software Corporation.
All rights reserved.