API_GetSchema

Overview

Use API_GetSchema to get information about the specified application or application table.

When invoked on an application dbid, this call returns DBVars created for the application and all child table dbids.

When invoked on a table dbid, the call returns DBVars and additional table-related information such as reports, field IDs (fid), base type, and the current property settings for each field. In addition, this call returns the default List All and List Changes reports. This call also returns any custom reports that you have created in the UI and saved as a common report. You can then use the query ID or query name in the various API calls that use queries, instead of manually constructing the query string yourself. See API_SetFieldProperties and API_DoQuery for more information on field property values.

Here’s a sample of what one of these saved queries looks like in the response:

<query id="5">
   <qname>Complete Refuel</qname>
   <qytype>table</qytype>
   <qydesc>fuel quantity greater than 10 gallons</qydesc>
   <qycrit>({'7'.AF.'03-24-2008'}AND{'6'.EX.'10'})</qycrit>
   <qyclst>8.6</qyclst>
   <qyopts>nos.</qyopts>
   <qycalst>0.0</qycalst>
</query>

This call can be used to create tooltips for your application based on the field help in your QuickBase application. You can API_GetSchema to get the field help and then load it into tooltips.

top

Request parameters

Parameter Value Required?

ticket

A valid authentication ticket.

The authentication ticket is returned via the API_Authenticate call.

yes

apptoken

A valid application token.

yes, if the application requires application tokens

udata

A string value that you want returned. It will not be handled by QuickBase but it will be returned in the response.

no

top

Response values

Element Name Value

action

The originating request, for example, API_GetSchema.

errcode

Identifies the error code, if any. (See the Error Codes appendix for a list of possible error codes.)

0 indicates that no error was encountered.

errtext

Text that explains the error code.

"No error" indicates that no error was encountered.

time_zone

A string value that defines the application's time zone.

udata

Optional. Contains any udata value supplied in the request.

table

Contains all of the application or table metadata, depending on the dbid supplied in the request.

top

Sample XML Request

POST https://<target_domain>/db/bddfa5nbx HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_GetSchema

<qdbapi>
   <udata>mydata</udata>
   <ticket>2_bddh73kcp_dpvx_b_df76449xfsjqqcstv6qcb932bki</ticket>
   <apptoken>dtmd897bfsw85bb6bneceb6wnze3</apptoken>
</qdbapi>

top

URL alternative

https://<target_domain>/db/bddfa5nbx?act=API_GetSchema&ticket=<your_ticket>
&apptoken=dtmd897bfsw85bb6bneceb6wnze3&udata=mydata

where <target_domain> is the domain against which you are invoking this call, for example, intuit.quickbase.com.

top

Sample Application-level Response

<?xml version="1.0" ?>
<qdbapi>
      <action>API_GetSchema</action>
      <errcode>0</errcode>
      <errtext>No error</errtext>
      <time_zone>(UTC-08:00) Pacific Time (US & Canada)</time_zone>
      <date_format>YYYY-MM-DD</date_format>
      <udata>mydata</udata>
      <table>
          <name>API created Sample</name>
          <desc>This is a sample application.</desc>
          <original>
                <app_id>bdb5rjd6h</app_id>
                <table_id>bdb5rjd6h</table_id>
                <cre_date>1204586581894</cre_date>
                <mod_date>1206394201119</mod_date>
                <next_record_id>1</next_record_id>
                <next_field_id>7</next_field_id>
                <next_query_id>5</next_query_id>
                <def_sort_fid>6</def_sort_fid>
                <def_sort_order>1</def_sort_order>
          </original>
          <variables>
               <var name="Blue">14</var>
               <var name="Jack">14</var>
              <var name="Magenta">12</var>
              <var name="usercode">14</var>
          </variables>
          <chdbids>
              <chdbid name="_dbid_doug_s_api_created_sample">bdb5rjd6g</chdbid>
              <chdbid name="_dbid_vehicle">bddrydqhg</chdbid>
          </chdbids>
         <fields></fields>
      </table>
</qdbapi>

top

Sample Table-level Response

<?xml version="1.0" ?>
<qdbapi>
 <action>API_GetSchema</action>
 <errcode>0</errcode>
 <errtext>No error</errtext>
 <time_zone>(UTC-08:00) Pacific Time (US & Canada)</time_zone>
 <date_format>YYYY-MM-DD</date_format>
 <udata>mydata</udata>
 <table>
   <name>API created Sample</name>
   <desc>This is a sample contact manager table.</desc>
   <original>
     <table_id>bdb5rjd6g</table_id>
     <app_id>bdb5rjd6g</app_id>
     <cre_date>1204586581894</cre_date>
     <mod_date>1206394201119</mod_date>
     <next_record_id>22</next_record_id>
     <next_field_id>24</next_field_id>
     <next_query_id>5</next_query_id>
     <def_sort_fid>6</def_sort_fid>
     <def_sort_order>1</def_sort_order>
   </original>
   <variables>
     <var name="Blue">14</var>
     <var name="Jack">14</var>
     <var name="Magenta">12</var>
     <var name="usercode">14</var>
   </variables>
   <queries>
    <query id="1">
     <qyname>List All</qyname>
      <qytype>table</qytype>
      <qycalst>0.0</qycalst>
     </query>
     <query id="2">
      <qyname>List Changes</qyname>
      <qytype>table</qytype>
      <qydesc>Sorted by Date Modified</qydesc>
      <qyslst>2</qyslst>
      <qyopts>so-D.onlynew.</qyopts>
      <qycalst>0.0</qycalst>
     </query>
   </queries>
   <fields>
     <field id="6" field_type="text" base_type="text">
     <label>Additional Information</label>
     <fieldhelp>Supply additional data about the problem.</fieldhelp>
      <nowrap>0</nowrap>
      .
      .
      .
    </field>
   </fields>
 </table>
</qdbapi>

top   

© 1999-2013 Intuit Inc. All rights reserved. Legal Notices.