{"id":3735,"date":"2023-08-31T07:50:14","date_gmt":"2023-08-31T06:50:14","guid":{"rendered":"https:\/\/help.expertsender.com\/?post_type=es&#038;p=3735"},"modified":"2024-03-19T13:24:31","modified_gmt":"2024-03-19T12:24:31","slug":"count-rows","status":"publish","type":"es","link":"https:\/\/help.expertsender.com\/pl\/emp\/api\/methods\/data-tables\/count-rows\/","title":{"rendered":"Count rows"},"content":{"rendered":"\n<p>Count rows in a data table using HTTP POST method.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h.u69qzo77jl6t_l\"><a href=\"https:\/\/sites.google.com\/expertsender.com\/api-documentation-v2\/methods\/data-tables\/count-rows?authuser=0#h.u69qzo77jl6t\"><\/a><a href=\"https:\/\/sites.google.com\/expertsender.com\/api-documentation-v2\/methods\/data-tables\/count-rows?authuser=0#h.u69qzo77jl6t\"><\/a><strong>Request data format<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Element\/attribute<\/th><th>Type<\/th><th>Notes<\/th><\/tr><\/thead><tbody><tr><td>ApiKey<\/td><td>string<\/td><td>Your API key, required for authentication.&nbsp;Required.<\/td><\/tr><tr><td>TableName<\/td><td>string<\/td><td>Table name.&nbsp;Required.<\/td><\/tr><tr><td>WhereConditions<\/td><td>complex<\/td><td>Collection of where conditions (Where elements). Optional.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Where element children:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Element\/attribute<\/th><th>Type<\/th><th>Notes<\/th><\/tr><\/thead><tbody><tr><td>ColumnName<\/td><td>string<\/td><td>Column name.&nbsp;Required.<\/td><\/tr><tr><td>Operator<\/td><td>string<\/td><td>Operator name from collection:&nbsp;Equals, Greater, Lower, Like.&nbsp;Required.<\/td><\/tr><tr><td>Value<\/td><td>string<\/td><td>Value to search.&nbsp;Required.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h.38b6g4z5tsne_l\"><strong>Response<\/strong><\/h3>\n\n\n\n<p>Response Count element:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Element\/attribute<\/th><th>Type<\/th><th>Notes<\/th><\/tr><\/thead><tbody><tr><td>Count<\/td><td>int<\/td><td>Number of records in table.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h.lrissnp1vk3p_l\"><strong>Examples<\/strong><\/h3>\n\n\n\n<p>Request:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#A6ACCD;--cbp-line-number-width:16.859375px;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"POST https:\/\/api.esv2.com\/v2\/Api\/DataTablesGetDataCount HTTP\/1.1\nAccept-Encoding: gzip,deflate\nContent-Type: text\/xml\nUser-Agent: Jakarta Commons-HttpClient\/3.1\nHost: api.esv2.com\nContent-Length: 346\n\n&lt;ApiRequest xmlns_xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xmlns_xs=&quot;http:\/\/www.w3.org\/2001\/XMLSchema&quot;&gt;\n   &lt;ApiKey&gt;test_api_key1&lt;\/ApiKey&gt;\n   &lt;TableName&gt;Tabela&lt;\/TableName&gt;\n   &lt;WhereConditions&gt;\n      &lt;Where&gt;\n         &lt;ColumnName&gt;Kolumna8&lt;\/ColumnName&gt;\n         &lt;Operator&gt;Like&lt;\/Operator&gt;\n         &lt;Value&gt;test&lt;\/Value&gt;\n      &lt;\/Where&gt;\n   &lt;\/WhereConditions&gt;\n&lt;\/ApiRequest&gt;\" style=\"color:#A6ACCD;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg  style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-palenight\" style=\"background-color: #292D3E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #A6ACCD\">POST https:\/\/api.esv2.com\/v2\/Api\/DataTablesGetDataCount HTTP\/1.1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Accept-Encoding: gzip,deflate<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Content-Type: text\/xml<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">User-Agent: Jakarta Commons-HttpClient\/3.1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Host: api.esv2.com<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Content-Length: 346<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">ApiRequest<\/span><span style=\"color: #89DDFF\"> <\/span><span style=\"color: #C792EA\">xmlns<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #C792EA\">xsi<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">http:\/\/www.w3.org\/2001\/XMLSchema-instance<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\"> <\/span><span style=\"color: #C792EA\">xmlns<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #C792EA\">xs<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">http:\/\/www.w3.org\/2001\/XMLSchema<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">   <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">ApiKey<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #A6ACCD\">test_api_key1<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">ApiKey<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">   <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">TableName<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #A6ACCD\">Tabela<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">TableName<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">   <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">WhereConditions<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">      <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">Where<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">         <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">ColumnName<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #A6ACCD\">Kolumna8<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">ColumnName<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">         <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">Operator<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #A6ACCD\">Like<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">Operator<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">         <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">Value<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #A6ACCD\">test<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">Value<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">      <\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">Where<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">   <\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">WhereConditions<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">ApiRequest<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>Response:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#A6ACCD;--cbp-line-number-width:16.859375px;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" data-code=\"HTTP\/1.1 200 OK\nCache-Control: private\nContent-Type: text\/xml; charset=utf-8\nContent-Encoding: gzip\nVary: Accept-Encoding\nServer: Microsoft-IIS\/7.5\nX-AspNetMvc-Version: 3.0\nX-AspNet-Version: 4.0.30319\nX-Powered-By: ASP.NET\nDate: Wed, 23 Jan 2013 13:01:02 GMT\nContent-Length: 212\n\n&lt;ApiResponse xmlns_xsd=&quot;http:\/\/www.w3.org\/2001\/XMLSchema&quot; xmlns_xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;&gt;\n   &lt;Count&gt;2&lt;\/Count&gt;\n&lt;\/ApiResponse&gt;\" style=\"color:#A6ACCD;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg  style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-palenight\" style=\"background-color: #292D3E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #A6ACCD\">HTTP\/1.1 200 OK<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Cache-Control: private<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Content-Type: text\/xml; charset=utf-8<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Content-Encoding: gzip<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Vary: Accept-Encoding<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Server: Microsoft-IIS\/7.5<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">X-AspNetMvc-Version: 3.0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">X-AspNet-Version: 4.0.30319<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">X-Powered-By: ASP.NET<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Date: Wed, 23 Jan 2013 13:01:02 GMT<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">Content-Length: 212<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">ApiResponse<\/span><span style=\"color: #89DDFF\"> <\/span><span style=\"color: #C792EA\">xmlns<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #C792EA\">xsd<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">http:\/\/www.w3.org\/2001\/XMLSchema<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\"> <\/span><span style=\"color: #C792EA\">xmlns<\/span><span style=\"color: #89DDFF\">:<\/span><span style=\"color: #C792EA\">xsi<\/span><span style=\"color: #89DDFF\">=<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #C3E88D\">http:\/\/www.w3.org\/2001\/XMLSchema-instance<\/span><span style=\"color: #89DDFF\">&quot;<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #A6ACCD\">   <\/span><span style=\"color: #89DDFF\">&lt;<\/span><span style=\"color: #F07178\">Count<\/span><span style=\"color: #89DDFF\">&gt;<\/span><span style=\"color: #A6ACCD\">2<\/span><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">Count<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #89DDFF\">&lt;\/<\/span><span style=\"color: #F07178\">ApiResponse<\/span><span style=\"color: #89DDFF\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n","protected":false},"author":5,"featured_media":0,"parent":3729,"menu_order":270,"template":"","format":"standard","emp-category":[],"class_list":["post-3735","es","type-es","status-publish","format-standard","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3735","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es"}],"about":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/types\/es"}],"author":[{"embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/users\/5"}],"version-history":[{"count":2,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3735\/revisions"}],"predecessor-version":[{"id":8846,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3735\/revisions\/8846"}],"up":[{"embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/es\/3729"}],"wp:attachment":[{"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/media?parent=3735"}],"wp:term":[{"taxonomy":"emp-category","embeddable":true,"href":"https:\/\/help.expertsender.com\/pl\/wp-json\/wp\/v2\/emp-category?post=3735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}