Retrieving Database Server Parameters

Use get operation to retrieve parameters of the database server specified by ID. You can retrieve preferences of multiple database servers in a single operation.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving a database server info includes the get operation node:

<packet>
<db_server>
  <get>
  ...
  </get>
</db_server>
</packet>

 

The get node has the following graphical representation:

Note: If the filter node is left blank (<filter/>), the operation will return info on all database servers.

Remarks

A single operation can retrieve the data of multiple database servers. Add as many different id parameters as the number of database servers info on which you want to retrieve.

<db_server>
   <get>
   ...
   </get>
...
   <get>
   ...
   </get>
</db_server>

 

Response Packet Structure

The get node of the output XML packet is structured as follows:

 

 

Samples

Retrieving a single database server

This packet retrieves the database server specified by ID 7

<packet>
<db_server>
  <get>
   <filter>
    <id>7</id>
   </filter>
   </get>
  </db_server>
</packet>

Response:

<packet>
<db_server>
  <get>
   <result>
     <status>ok</status>
        <id>7</id>
        <data>
          <host>14.13.11.2</host>
          <port>5432</port>
          <type>mysql</type>
          <admin></admin>
          <status>CREDENTIALS_NOT_SET</status>
          <db_num>0</db_num>
        </data>
   </result>
  </get>
</db_server>
</packet>

 If the database server was not found, the result is as follows:

<packet>
<db_server>
  <get>
   <result>
     <status>error</status>
     <errcode>1013</errcode>
     <errtext>Database server does not exist.</errtext>
   </result>
  </get>
</db_server>
</packet>
Retrieving multiple database servers

This request packet retrieves info on the database servers specified by ID 2 and ID 92.

<packet>
<db_server>
  <get>
   <filter>
    <id>2</id><id>92</id>
   </filter>
   </get>
  </db_server>
</packet>

Response:

<packet>
<db_server>
  <get>
   <result>
     <status>ok</status>
        <id>2</id>
        <data>
          <host>localhost</host>
          <port>5432</port>
          <type>postgresql</type>
          <admin></admin>
          <status>CREDENTIALS_NOT_SET</status>
          <db_num>0</db_num>
          <default></default>
          <local></local>
        </data>
   </result>
   <result>
     <status>ok</status>
        <id>92</id>
        <data>
          <host>some.host</host>
          <port>5432</port>
          <type>postgresql</type>
          <admin>admin</admin>
          <password>qweqwe</password>
          <status>OTHER_ERROR</status>
          <db_num>0</db_num>
        </data>
   </result>
  </get>
</db_server>
</packet>