Get list of tables
Request data format
Request URL parameters:
Parameter | Type | Notes |
---|---|---|
apiKey | string | Your API key, required for authentication. Required. |
name | string | Name of Data Table. Optional. |
Examples:
https://api.esv2.com/v2/Api/DataTablesGetTables?apiKey=YOUR_API_KEY_HERE
https://api.esv2.com/v2/Api/DataTablesGetTables?apiKey=YOUR_API_KEY_HERE&name=TABLE_NAME
Response
Response Table element (if request doesn’t contain name):
Element/attribute | Type | Notes |
---|---|---|
Id | int | Table ID. |
Name | string | Table name. |
ColumnsCount | int | Number of columns in table. |
RelationshipsCount | int | Number of relationships. |
RelationshipsDestinationCount | int | Number of relationships with other table. |
Rows | int | Number of rows in table. |
Size | int | Size of table in megabytes. |
Examples:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Mon, 10 Jun 2013 16:02:49 GMT
Content-Length: 320
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TableList>
<Tables>
<Table>
<Id>1</Id>
<Name>Table1</Name>
<ColumnsCount>8</ColumnsCount>
<RelationshipsCount>0</RelationshipsCount>
<RelationshipsDestinationCount>1</RelationshipsDestinationCount>
<Rows>5</Rows>
<Size>0.05</Size>
</Table>
</Tables>
</TableList>
</ApiResponse>
Response Details element (if request contain name):
Element/attribute | Type | Notes |
---|---|---|
Id | int | Table ID. |
Name | string | Table name. |
ColumnsCount | int | Number of columns in table. |
RelationshipsCount | int | Number of relationships. |
RelationshipsDestinationCount | int | Number of relationships with other table. |
Rows | int | Number of rows in table. |
Columns | complex | Collection of columns information in table (TableColumn elements). |
TableColumn (children of Columns element) element children:
Element/attribute | Type | Notes |
---|---|---|
Name | string | Column name. |
ColumnsType | string | Type of column. |
Length | int | Length for string type columns. |
DefaultValue | string | Default value. Omitted if column has no default value. |
IsPrimaryKey | boolean | „true” if column is a part of primary key (PK). Omitted if not. |
IsRequired | boolean | „true” if column is required. Omitted if not. |
Examples:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Mon, 10 Jun 2013 16:01:58 GMT
Content-Length: 1826
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Details>
<Id>1</Id>
<Name>Table1</Name>
<ColumnsCount>0</ColumnsCount>
<RelationshipsCount>0</RelationshipsCount>
<RelationshipsDestinationCount>0</RelationshipsDestinationCount>
<Rows>0</Rows>
<Description>Table1 description</Description>
<Columns>
<TableColumn>
<Name>Column1</Name>
<ColumnType>String</ColumnType>
<Length>4000</Length>
<DefaultValue>test</DefaultValue>
<IsPrimaryKey>true</IsPrimaryKey>
</TableColumn>
<TableColumn>
<Name>Column2</Name>
<ColumnType>Number</ColumnType>
<Length>0</Length>
<IsRequired>true</IsRequired>
</TableColumn>
<TableColumn>
<Name>Column3</Name>
<ColumnType>Number</ColumnType>
<Length>0</Length>
</TableColumn>
<TableColumn>
<Name>Column4</Name>
<ColumnType>Date</ColumnType>
<Length>0</Length>
<DefaultValue>2012-11-20</DefaultValue>
</TableColumn>
<TableColumn>
<Name>Column5</Name>
<ColumnType>DateTime</ColumnType>
<Length>0</Length>
<DefaultValue>2012-11-20 11:08:33.565</DefaultValue>
</TableColumn>
<TableColumn>
<Name>Column6</Name>
<ColumnType>Boolean</ColumnType>
<Length>0</Length>
<DefaultValue>False</DefaultValue>
</TableColumn>
<TableColumn>
<Name>Column7</Name>
<ColumnType>Double</ColumnType>
<Length>0</Length>
</TableColumn>
<TableColumn>
<Name>Column8</Name>
<ColumnType>SubscriberEmail</ColumnType>
<Length>0</Length>
</TableColumn>
</Columns>
</Details>
</ApiResponse>