Count rows
Count rows in a data table using HTTP POST method.
Request data format
Element/attribute | Type | Notes |
---|---|---|
ApiKey | string | Your API key, required for authentication. Required. |
TableName | string | Table name. Required. |
WhereConditions | complex | Collection of where conditions (Where elements). Optional. |
Where element children:
Element/attribute | Type | Notes |
---|---|---|
ColumnName | string | Column name. Required. |
Operator | string | Operator name from collection: Equals, Greater, Lower, Like. Required. |
Value | string | Value to search. Required. |
Response
Response Count element:
Element/attribute | Type | Notes |
---|---|---|
Count | int | Number of records in table. |
Examples
Request:
POST https://api.esv2.com/v2/Api/DataTablesGetDataCount HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
Content-Length: 346
<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ApiKey>test_api_key1</ApiKey>
<TableName>Tabela</TableName>
<WhereConditions>
<Where>
<ColumnName>Kolumna8</ColumnName>
<Operator>Like</Operator>
<Value>test</Value>
</Where>
</WhereConditions>
</ApiRequest>
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-AspNetMvc-Version: 3.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 23 Jan 2013 13:01:02 GMT
Content-Length: 212
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Count>2</Count>
</ApiResponse>