Przejdź do treści

Get list of tables

Request data format

Request URL parameters:

ParameterTypeNotes
apiKeystringYour API key, required for authentication. Required.
namestringName 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/attributeTypeNotes
IdintTable ID.
NamestringTable name.
ColumnsCountintNumber of columns in table.
RelationshipsCountintNumber of relationships.
RelationshipsDestinationCountintNumber of relationships with other table.
RowsintNumber of rows in table.
SizeintSize 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/attributeTypeNotes
IdintTable ID.
NamestringTable name.
ColumnsCountintNumber of columns in table.
RelationshipsCountintNumber of relationships.
RelationshipsDestinationCountintNumber of relationships with other table.
RowsintNumber of rows in table.
ColumnscomplexCollection of columns information in table (TableColumn elements).

TableColumn (children of Columns element) element children:

Element/attributeTypeNotes
NamestringColumn name.
ColumnsTypestringType of column.
LengthintLength for string type columns.
DefaultValuestringDefault value. Omitted if column has no default value.
IsPrimaryKeyboolean„true” if column is a part of primary key (PK). Omitted if not.
IsRequiredboolean„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>
Na tej stronie
Do góry