Get Columns

This endpoint allows you get column information for your database(s).

POST Parameters

ParameterRequiredValueDescription
api_key{key}An API key that has access to the resource you want to query for
database_id{integer}The ID of a database you want to get the column information for
column_id{integer}The ID of the column you wish to get details for
column_name{string}The name of the column you want information for
group_id{integer}Used in conjunction with the column_name parameter to limit results
Information Circle

Important Requirements:

  • One of database_id, column_id, or column_name must be provided (⚠️ indicates at least one is required)
  • If any of these parameters conflict, no result will be returned
  • group_id is only used with column_name parameter to limit results

Response Information

ElementDescription
<status>A status code in response to the operation.
<message>Additional information about the operation – human readable.
<column>A containing tag for the sub-elements containing the actual information about each column. There can be multiple columns within each set of this tag.
<column>→<id>The ID of the column
<column>→<name>The name of the column
<column>→<database_id>The database ID the column belongs to
<column>→<group_id>The group ID the column belongs to

Example

Sample Request

POST https://api-app.xtracta.com/v1/databases/columns HTTP/1.1
api_key=123&database_id=12345

Sample Response

<?xml version="1.0" encoding="UTF-8"?>
<databases_response>
    <status>200</status>
    <message>The request has been successfully processed</message>
    <column>
        <id>12345678</id>
        <name>Column-1</name>
        <database_id>12345</database_id>
        <group_id>12345</group_id>
    </column>
    <column>
        <id>12345679</id>
        <name>Column-2</name>
        <database_id>12345</database_id>
        <group_id>12345</group_id>
    </column>
</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="ColumnType">
    <xs:sequence>
      <xs:element name="id" type="xs:positiveInteger"/>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="database_id" type="xs:integer"/>
      <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="column" type="ColumnType" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

</xs:schema>