puttab
(Modify table metadata)
The puttab
transaction modifies the meta information for a
table.
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: Thepswd
value should be the encrypted password returned from thelogin
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 (exceptlogin
). 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: Ifkill=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 input specification must contain the following elements:
<tab>
- Contains information about a table. The table's metadata is contained within
attributes of the
<tab>
element.
<tab>
element:id
- The unique identification number for the directory, table, or query. The ID is an integer.
name
- The full path to the table, directory, or query to which the metadata belongs.
title
- The title, or label, of the directory, table, or query.
sdesc
- The short description of the directory, table, or query.
ldesc
- The long description of the directory, table, or query.
secure
- Returns
1
if the directory, table, or query is marked as "secure" and0
if it is not marked as "secure".Note: This metadata element is still returned but has been deprecated. owner
- The owner of the directory, table, or query.
gif
- Returns the location of the gif file to be used to display the directory, table, or query in the UI.
users
- A space-separated list of users and groups whom are allowed to access this directory, table, or query.
XML response from server
A successful response from the server contains the following elements:
The directory metadata is returned as a series of attributes contained within the
<tab>
element. The attributes are as follows:
id
- The id number of the table. Table id is represented as an integer value.
name
- The full name of the table, represented as a path to the table.
type
- Specifies the type of table. Possible return values are as follows:
REAL
VIEW
PARAM
MERGED
UQ
TOLERANT
display
- The output type of the table. Possible return values are as follows:
TABLE
EXCEL
CHART
REPORT
TEXT
XML
report
- A boolean flag indicating whether the table or query has report specifications saved.
Returns a
0
if no specifications are saved and a1
if there are saved specifications. chart
- A boolean flag indicating whether the table or query has chart specifications saved.
Returns a
0
if no specifications are saved and a1
if there are saved specifications. title
- The title of the table.
sdesc
- The short description of the table.
ldesc
- The long description of the table.
link
- A string that will be prepended to table headers during a link.
rows
- The number of rows in the table.
bytes
- The number of bytes the table consumes on disk.
segby
- The column on which the table is segmented.
segs
- The number of segments contained in the table.
tstat
- Specifies whether the table is can be accessed by time-series functions. If so,
returns
1
. If not, returns1
. access
- Specifies whether the table is accessible. If so, a
1
is returned. If not, a0
is returned. secure
- Returns
1
if the directory, table, or query is marked as "secure" and0
if it is not marked as "secure".Note: This metadata element is still returned but has been deprecated. own
- Boolean flag specifying whether the UID used for the API transaction is the owner of the directory.
owner
- The owner of the directory, table, or query.
update
- The date and time the directory's metadata was last modified. If it was created and never modified, returns the date and time the directory was created.
users
- A space-separated list of users and groups whom are allowed to access this directory, table, or query.
maxdown
- The maximum number of rows that can be downloaded from the table at a time.
favorite
- Specifies whether the table is flagged as a favorite for the user ID making the
request. Returns
1
if the table is a favorite and a0
if it isn't.
Query string example
https://www2.1010data.com/gw.k?api=puttab&apiversion=3&uid=$UID&pswd=$PSWD&sid=$SID
XML input example
<in> <tab id="3427628" name="certification.finance.equity" title="Yahoo Finance Equities"/> </in>
XML response example
A successful puttab
produces the following result, based on the input
example:
<out> <rc>0</rc> <msg>puttab successful</msg> <tab id="3427628" name="certification.finance.equity" type="REAL" display="TABLE" report="0" chart="0" title="Yahoo Finance Equities" sdesc="" ldesc="" link="" rows="28261234" bytes="1582632792" segs="4" tstat="0" access="1" secure="0" maxdown="" own="1" owner="chen2" mode="data" segby="ticker" update="2016-02-24 07:36:06" users=""/> </out>