tabinfo (Get information about a table)

The tabinfo transaction returns information about a table. Unlike the gettab transaction, the metadata returned by a tabinfo transaction is provided in a table tree.

Query string

The query string in the HTTP header must contain the following parameters:

api
Specify the name of the API transaction.
apiversion
Specify the version of the API that should handle the requested transaction.

For the most up-to-date version, use apiversion=3.

uid
Specify a valid 1010data user name.
pswd
Specify a valid password for the 1010data user name provided to the uid parameter.
Note: The pswd value should be the encrypted password returned from the login transaction.
sid
The session ID for the current API session.

This value is returned by the login transaction and must be provided to every transaction (except login).

kill (optional)
Valid values for kill are as follows:
yes
Terminate the existing session and start a new one.
no
Do not terminate the existing session.

If no session exists, a new one will be created. If a session does exist, an error is returned.

Note: If kill=no and a session is active, the system returns an error.
possess
Log in and possess the existing session.
auth
Authenticate with the system but do not kill, possess, or start any session.

The default is yes.

XML input to server

The specifications must contain the following element:

<name>
The full name of a table. Table names are specified as a full path to the location of the table, e.g., directory1.directory2.directory[N].table.

XML response from server

The session ID and encrypted password are used in subsequent transactions. If the login is not successful, only the return code and error message are returned. A successful result contains the following elements:

<rc>
The return code generated by the transaction. For a list of return codes, see Return codes.
<msg>
The message returned by the system. Specific messages correspond to specific return codes.
<table>
A 1010data XML table tree. To see the full XML specification for the table tree, see Table Tree.

The <table> element (see Table Tree) contains information about the table. It is equivalent to the table with zero rows of data (i.e., the <data> element is empty.) In the event of an error, only the return code and error message are returned.

Query string example

https://www2.1010data.com/gw.k?api=tabinfo&apiversion=3&uid=$UID&pswd=$PSWD&sid=$SID

XML input example

<in>
  <name>pub.demo.retail.prod</name>
</in>

XML response example

<out>
    <rc>0</rc>
    <msg>tabinfo successful</msg>
    <table name="pub.demo.retail.prod" segby="">
        <title>Product Master</title>
        <sdesc/>
        <ldesc/>
        <link/>
        <cols>
            <th name="sku" type="a" fixed="0">SKU</th>
            <th name="itemdesc" type="a" fixed="0">Item
            Description</th>
            <th name="class" type="i" fixed="0">Class</th>
            <th name="classdesc" type="a" fixed="0">Class
            Description</th>
            <th name="dept" type="i" fixed="0">Department</th>
            <th name="deptdesc" type="a" fixed="0">Department
            Description</th>
            <th name="div" type="i" fixed="0">Division</th>
            <th name="divdesc" type="a" fixed="0">Division
            Description</th>
        </cols>
        <data/>
    </table>
</out>