Przejdź do treści

Count rows

Count rows in a data table using HTTP POST method.

Request data format

Element/attributeTypeNotes
ApiKeystringYour API key, required for authentication. Required.
TableNamestringTable name. Required.
WhereConditionscomplexCollection of where conditions (Where elements). Optional.

Where element children:

Element/attributeTypeNotes
ColumnNamestringColumn name. Required.
OperatorstringOperator name from collection: Equals, Greater, Lower, Like. Required.
ValuestringValue to search. Required.

Response

Response Count element:

Element/attributeTypeNotes
CountintNumber 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>
Na tej stronie
Do góry