Retrieving Database Users Info

You can retrieve information on users of the certain database. To retrieve information on database users, specify the ID of the database. You can retrieve information about users of multiple databases in a single get-db-users operation.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving users info from the database includes the get-db-users operation node:

<packet>
<database>
   <get-db-users>
   ...
   </get-db-users>
</database>
</packet>

 

The get-db-user node is presented by type DatabaseGetDBUserInputType (database_input.xsd), and its graphical representation is as follows:

GetDBUsers

Remarks

You can retrieve information from multiple databases using a single get-db-users operation. Add as many db-id parameters to the filtering rule as the number of different databases you want to scan.

<database>
<get-db-users>
   <filter>
      <db-id>...</db-id>
      ...
      <db-id>...</db-id>
   </filter>
</get-db-users>
</database>

 

Note: Use the <filter/> parameter to retrieve information about all users from all databases available for the user identified by credentials from HTTP header.

 

Response Packet Structure

The get-db-users node of the output XML packet is presented by type DatabaseGetDBUsersOutputType (database_output.xsd) and structured as follows:

 

 

Samples

Retrieving information about database users

This request packet retrieves information on all users of the database with ID 79.

<packet>
<database>
   <get-db-users>
      <filter>
          <db-id>79</db-id>
      </filter>
   </get-db-users>
</database>
</packet> 

Response:

<packet>
<database>
   <get-db-users>

      <result>
          <status>ok</status>
          <filter-id>79</filter-id>
          <id>15</id>
          <login>UserOne</login>
          <db-id>79</db-id>
      </result>

      <result>
          <status>ok</status>
          <filter-id>79</filter-id>
          <id>15</id>
          <login>UserTwo</login>
          <db-id>79</db-id>
      </result>

   </get-db-users>
</database>
</packet>
Retrieving information about all users of all databases

This request packet retrieves information on all users of all available databases.

<packet>
<database>
   <get-db-users>
      <filter/>
   </get-db-users>
</database>
</packet>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.7.0">
  <database>
    <get-db-users>
      <result>
        <status>ok</status>
      </result>
    </get-db-users>
  </database>
</packet>