/v2/Api/DataTablesGetDataCount POST
Используется метод HTTP POST.
Запрос
Элемент/атрибут | Тип | Описание |
---|---|---|
ApiKey | string | API key для аутентификации. Обязательный. |
TableName | string | Имя таблицы. Обязательный. |
WhereConditions | complex | Коллекция условий WHERE(элементы Where). Не обязательный. |
Элементы тега Where:
Элемент/атрибут | Тип | Описание |
---|---|---|
ColumnName | string | Имя столбца. Обязательный |
Operator | string | Имя оператора из коллекции: Equals, Greater, Lower, Like. Обязательный |
Value | string | Значение для поиска. Обязательный |
Ответ
Элемент/атрибут | Тип | Описание |
---|---|---|
Count | int | Количество записей. |
Примеры:
Запрос:
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>Ваш_API-ключ</ApiKey> <TableName>Таблица</TableName> <WhereConditions> <Where> <ColumnName>Столбец8</ColumnName> <Operator>Like</Operator> <Value>test</Value> </Where> </WhereConditions> </ApiRequest>
Ответ:
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>