Get Databases

This endpoint allows you to get information about what databases exist and the details of those. It provides many options to search on such as group_ids, database name and so on. While unlikely a connector would make use of this endpoint, it can be useful for finding databases in complex or large group structures or for a variety of more-unique applications of the API.

POST Parameters

ParameterRequiredValueDescription
api_key{key}An API key that has access to the resource you want to query for
group_id{integer}A Group ID where you want information for all databases that are part of this group
database_id{integer}A Database ID which you want information for such as getting its name and parent group
database_name{unicode}Get all databases which match this name which the API key has access to. While it is impossible to have the same database name within the same group, it is possible to have the same database name in other groups
Information Circle

Important Requirements:

  • One of group_id, database_id, or database_name must be provided (⚠️ indicates at least one is required)
  • The others should be left blank when using one of these parameters

Response Information

ElementDescription
<status>A status code in response to the operation.
<message>Additional information about the operation – human readable.
<database>This element contains all of the further sub-elements with information about the database. This element can repeat if the request returns multiple databases (e.g. where the group_id or database_name are used).
<id>The unique ID of the database.
<name>The name of the database.
<group_id>The group ID which the database is a child of.

Example where group_id POSTed OR database_id not POSTed

Sample Request

POST https://api-app.xtracta.com/v1/databases HTTP/1.1
api_key=123&group_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
    <status>200</status>
    <message>The request has been successfully processed</message>
    <database>
        <id>12345678</id>
        <name>Supplier-list</name>
        <group_id>987654321</group_id>
    </database>
    <database>
        <id>123456789</id>
        <name>Item-code-list</name>
        <group_id>987654321</group_id>
    </database>
</databases_response>

Schema Definition

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

  <xs:simpleType name="ConfidenceType">
    <xs:union>
      <xs:simpleType>
        <xs:restriction base="xs:integer">
          <xs:minInclusive value="0"/>
          <xs:maxInclusive value="100"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value=""/>
        </xs:restriction>
      </xs:simpleType>
    </xs:union>
  </xs:simpleType>

  <xs:complexType name="DatabaseType">
    <xs:sequence>
      <xs:element name="id" type="xs:positiveInteger"/>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="group_id" type="xs:positiveInteger"/>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="databases_response">
    <xs:complexType>
      <xs:sequence>
      <xs:element name="status" type="xs:positiveInteger"/>
      <xs:element name="message" type="xs:string"/>
      <xs:element name="database" type="DatabaseType" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>

Example where database_id POSTed

Sample Request

POST https://api-app.xtracta.com/v1/databases HTTP/1.1

api_key=123&database_id=456789

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
    <status>200</status>
    <message>The request has been successfully processed</message>
    <database>
        <id>456789</id>
        <name>Suppliers</name>
        <group_id>3</group_id>
    </database>
</databases_response>

Example where database_name POSTed

Sample Request

POST https://api-app.xtracta.com/v1/databases HTTP/1.1

api_key=123&database_name=Suppliers

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
    <status>200</status>
    <message>The request has been successfully processed</message>
    <database>
        <id>456789</id>
        <name>Suppliers</name>
        <group_id>3</group_id>
    </database>
</databases_response>