Lauri Ojansivu 3 vuotta sitten
vanhempi
sitoutus
5fc5500845
10 muutettua tiedostoa jossa 571 lisäystä ja 43 poistoa
  1. 4 2
      CHANGELOG.md
  2. 1 1
      Stackerfile.yml
  3. 1 1
      helm/wekan/Chart.yaml
  4. 1 1
      helm/wekan/values.yaml
  5. 1 1
      package-lock.json
  6. 1 1
      package.json
  7. 500 32
      public/api/wekan.html
  8. 59 1
      public/api/wekan.yml
  9. 2 2
      sandstorm-pkgdef.capnp
  10. 1 1
      snapcraft.yaml

+ 4 - 2
CHANGELOG.md

@@ -1,6 +1,6 @@
 [Mac ChangeLog](https://github.com/wekan/wekan/wiki/Mac)
 
-# Upcoming WeKan ® release
+# v6.13 2022-04-01 WeKan ® release
 
 This release adds the following new features:
 
@@ -21,7 +21,9 @@ and adds the following updates:
   Thanks to xet7.
 - [Updated URL to meteor-spk](https://github.com/wekan/wekan/commit/f2f3b76eda982856f88f5289c6d574fdf95abd82).
   Thanks to xet7.
-- [Updated dependencies](https://github.com/wekan/wekan/commit/c397b5eda8e60ef41ce66bec716f859c352d4744).
+- Updated dependencies.
+  [Part 1](https://github.com/wekan/wekan/commit/c397b5eda8e60ef41ce66bec716f859c352d4744),
+  [Part 2](https://github.com/wekan/wekan/commit/971391eae9e9d7df341de630a28e074408991c2c).
   Thanks to developers of dependencies.
 
 and fixes the following bugs:

+ 1 - 1
Stackerfile.yml

@@ -1,5 +1,5 @@
 appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
-appVersion: "v6.12.0"
+appVersion: "v6.13.0"
 files:
   userUploads:
     - README.md

+ 1 - 1
helm/wekan/Chart.yaml

@@ -1,5 +1,5 @@
 apiVersion: v2
-appVersion: "6.12"
+appVersion: "6.13"
 dependencies:
   - condition: mongodb.enabled
     name: mongodb

+ 1 - 1
helm/wekan/values.yaml

@@ -14,7 +14,7 @@ serviceAccounts:
 ##
 image:
   repository: quay.io/wekan/wekan
-  tag: v6.12
+  tag: v6.13
   pullPolicy: IfNotPresent
 
 ## Configuration for wekan component

+ 1 - 1
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "wekan",
-  "version": "v6.12.0",
+  "version": "v6.13.0",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "wekan",
-  "version": "v6.12.0",
+  "version": "v6.13.0",
   "description": "Open-Source kanban",
   "private": true,
   "repository": {

+ 500 - 32
public/api/wekan.html

@@ -7,7 +7,7 @@
     <meta charset="utf-8">
     <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-    <title>Wekan REST API v6.12</title>
+    <title>Wekan REST API v6.13</title>
 
     <style>
     </style>
@@ -1558,7 +1558,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
 	  	<ul class="toc-list-h1">
         
           <li>
-            <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v6.12">Wekan REST API v6.12</a>
+            <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v6.13">Wekan REST API v6.13</a>
             
           </li>
         
@@ -1742,6 +1742,11 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
                     
                   </li>
                 
+                  <li>
+                    <a href="#get_board_cards_count" class="toc-h2 toc-link" data-title="">get_board_cards_count</a>
+                    
+                  </li>
+                
                   <li>
                     <a href="#get_all_cards" class="toc-h2 toc-link" data-title="">get_all_cards</a>
                     
@@ -1767,6 +1772,11 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
                     
                   </li>
                 
+                  <li>
+                    <a href="#get_list_cards_count" class="toc-h2 toc-link" data-title="">get_list_cards_count</a>
+                    
+                  </li>
+                
                   <li>
                     <a href="#get_swimlane_cards" class="toc-h2 toc-link" data-title="">get_swimlane_cards</a>
                     
@@ -2146,7 +2156,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
     <div class="page-wrapper">
       <div class="dark-box"></div>
       <div class="content">
-        <h1 id="wekan-rest-api">Wekan REST API v6.12</h1>
+        <h1 id="wekan-rest-api">Wekan REST API v6.13</h1>
 <blockquote>
 <p>Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.</p>
 </blockquote>
@@ -8306,6 +8316,231 @@ System.out.println(response.toString());
 To perform this operation, you must be authenticated by means of one of the following methods:
 UserSecurity
 </aside>
+<h2 id="get_board_cards_count">get_board_cards_count</h2>
+<p><a id="opIdget_board_cards_count"></a></p>
+<blockquote>
+<p>Code samples</p>
+</blockquote>
+<pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span>
+curl -X GET /api/boards/{board}/cards_count \
+  -H <span class="hljs-string">&#x27;Accept: application/json&#x27;</span> \
+  -H <span class="hljs-string">&#x27;Authorization: API_KEY&#x27;</span>
+
+</code></pre>
+<pre class="highlight tab tab-http"><code><span class="hljs-keyword">GET</span> <span class="hljs-string">/api/boards/{board}/cards_count</span> <span class="hljs-meta">HTTP/1.1</span>
+
+<span class="ada"><span class="hljs-keyword">Accept</span>: application/json
+
+</span></code></pre>
+<pre class="highlight tab tab-javascript"><code>
+<span class="hljs-keyword">const</span> headers = {
+  <span class="hljs-string">&#x27;Accept&#x27;</span>:<span class="hljs-string">&#x27;application/json&#x27;</span>,
+  <span class="hljs-string">&#x27;Authorization&#x27;</span>:<span class="hljs-string">&#x27;API_KEY&#x27;</span>
+};
+
+fetch(<span class="hljs-string">&#x27;/api/boards/{board}/cards_count&#x27;</span>,
+{
+  <span class="hljs-attr">method</span>: <span class="hljs-string">&#x27;GET&#x27;</span>,
+
+  <span class="hljs-attr">headers</span>: headers
+})
+.then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) </span>{
+    <span class="hljs-keyword">return</span> res.json();
+}).then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">body</span>) </span>{
+    <span class="hljs-built_in">console</span>.log(body);
+});
+
+</code></pre>
+<pre class="highlight tab tab-javascript--nodejs"><code><span class="hljs-keyword">const</span> fetch = <span class="hljs-built_in">require</span>(<span class="hljs-string">&#x27;node-fetch&#x27;</span>);
+
+<span class="hljs-keyword">const</span> headers = {
+  <span class="hljs-string">&#x27;Accept&#x27;</span>:<span class="hljs-string">&#x27;application/json&#x27;</span>,
+  <span class="hljs-string">&#x27;Authorization&#x27;</span>:<span class="hljs-string">&#x27;API_KEY&#x27;</span>
+};
+
+fetch(<span class="hljs-string">&#x27;/api/boards/{board}/cards_count&#x27;</span>,
+{
+  <span class="hljs-attr">method</span>: <span class="hljs-string">&#x27;GET&#x27;</span>,
+
+  <span class="hljs-attr">headers</span>: headers
+})
+.then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) </span>{
+    <span class="hljs-keyword">return</span> res.json();
+}).then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">body</span>) </span>{
+    <span class="hljs-built_in">console</span>.log(body);
+});
+
+</code></pre>
+<pre class="highlight tab tab-ruby"><code><span class="hljs-keyword">require</span> <span class="hljs-string">&#x27;rest-client&#x27;</span>
+<span class="hljs-keyword">require</span> <span class="hljs-string">&#x27;json&#x27;</span>
+
+headers = {
+  <span class="hljs-string">&#x27;Accept&#x27;</span> =&gt; <span class="hljs-string">&#x27;application/json&#x27;</span>,
+  <span class="hljs-string">&#x27;Authorization&#x27;</span> =&gt; <span class="hljs-string">&#x27;API_KEY&#x27;</span>
+}
+
+result = RestClient.get <span class="hljs-string">&#x27;/api/boards/{board}/cards_count&#x27;</span>,
+  <span class="hljs-symbol">params:</span> {
+  }, <span class="hljs-symbol">headers:</span> headers
+
+p JSON.parse(result)
+
+</code></pre>
+<pre class="highlight tab tab-python"><code><span class="hljs-keyword">import</span> requests
+headers = {
+  <span class="hljs-string">&#x27;Accept&#x27;</span>: <span class="hljs-string">&#x27;application/json&#x27;</span>,
+  <span class="hljs-string">&#x27;Authorization&#x27;</span>: <span class="hljs-string">&#x27;API_KEY&#x27;</span>
+}
+
+r = requests.get(<span class="hljs-string">&#x27;/api/boards/{board}/cards_count&#x27;</span>, headers = headers)
+
+<span class="hljs-built_in">print</span>(r.json())
+
+</code></pre>
+<pre class="highlight tab tab-java"><code>URL obj = <span class="hljs-keyword">new</span> URL(<span class="hljs-string">&quot;/api/boards/{board}/cards_count&quot;</span>);
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod(<span class="hljs-string">&quot;GET&quot;</span>);
+<span class="hljs-keyword">int</span> responseCode = con.getResponseCode();
+BufferedReader in = <span class="hljs-keyword">new</span> BufferedReader(
+    <span class="hljs-keyword">new</span> InputStreamReader(con.getInputStream()));
+String inputLine;
+StringBuffer response = <span class="hljs-keyword">new</span> StringBuffer();
+<span class="hljs-keyword">while</span> ((inputLine = in.readLine()) != <span class="hljs-keyword">null</span>) {
+    response.append(inputLine);
+}
+in.close();
+System.out.println(response.toString());
+
+</code></pre>
+<pre class="highlight tab tab-go"><code><span class="hljs-keyword">package</span> main
+
+<span class="hljs-keyword">import</span> (
+       <span class="hljs-string">&quot;bytes&quot;</span>
+       <span class="hljs-string">&quot;net/http&quot;</span>
+)
+
+<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span> {
+
+    headers := <span class="hljs-keyword">map</span>[<span class="hljs-keyword">string</span>][]<span class="hljs-keyword">string</span>{
+        <span class="hljs-string">&quot;Accept&quot;</span>: []<span class="hljs-keyword">string</span>{<span class="hljs-string">&quot;application/json&quot;</span>},
+        <span class="hljs-string">&quot;Authorization&quot;</span>: []<span class="hljs-keyword">string</span>{<span class="hljs-string">&quot;API_KEY&quot;</span>},
+    }
+
+    data := bytes.NewBuffer([]<span class="hljs-keyword">byte</span>{jsonReq})
+    req, err := http.NewRequest(<span class="hljs-string">&quot;GET&quot;</span>, <span class="hljs-string">&quot;/api/boards/{board}/cards_count&quot;</span>, data)
+    req.Header = headers
+
+    client := &amp;http.Client{}
+    resp, err := client.Do(req)
+    <span class="hljs-comment">// ...</span>
+}
+
+</code></pre>
+<pre class="highlight tab tab-php"><code> <span class="hljs-string">&#x27;application/json&#x27;</span>,
+    <span class="hljs-string">&#x27;Authorization&#x27;</span> =&gt; <span class="hljs-string">&#x27;API_KEY&#x27;</span>,
+);
+
+<span class="hljs-variable">$client</span> = <span class="hljs-keyword">new</span> \GuzzleHttp\Client();
+
+<span class="hljs-comment">// Define array of request body.</span>
+<span class="hljs-variable">$request_body</span> = <span class="hljs-keyword">array</span>();
+
+<span class="hljs-keyword">try</span> {
+    <span class="hljs-variable">$response</span> = <span class="hljs-variable">$client</span>-&gt;request(<span class="hljs-string">&#x27;GET&#x27;</span>,<span class="hljs-string">&#x27;/api/boards/{board}/cards_count&#x27;</span>, <span class="hljs-keyword">array</span>(
+        <span class="hljs-string">&#x27;headers&#x27;</span> =&gt; <span class="hljs-variable">$headers</span>,
+        <span class="hljs-string">&#x27;json&#x27;</span> =&gt; <span class="hljs-variable">$request_body</span>,
+       )
+    );
+    print_r(<span class="hljs-variable">$response</span>-&gt;getBody()-&gt;getContents());
+ }
+ <span class="hljs-keyword">catch</span> (\GuzzleHttp\<span class="hljs-built_in">Exception</span>\BadResponseException <span class="hljs-variable">$e</span>) {
+    <span class="hljs-comment">// handle exception or api errors.</span>
+    print_r(<span class="hljs-variable">$e</span>-&gt;getMessage());
+ }
+
+ <span class="hljs-comment">// ...</span>
+
+</code></pre>
+<p><code>GET /api/boards/{board}/cards_count</code></p>
+<p><em>Get a cards count to a board</em></p>
+<h3 id="get_board_cards_count-parameters">Parameters</h3>
+<table>
+<thead>
+<tr>
+<th>Name</th>
+<th>In</th>
+<th>Type</th>
+<th>Required</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>board</td>
+<td>path</td>
+<td>string</td>
+<td>true</td>
+<td>the board ID</td>
+</tr>
+</tbody>
+</table>
+<h4 id="detailed-descriptions-21">Detailed descriptions</h4>
+<p><strong>board</strong>: the board ID</p>
+<blockquote>
+<p>Example responses</p>
+</blockquote>
+<blockquote>
+<p>200 Response</p>
+</blockquote>
+<pre class="highlight tab tab-json"><code>{
+  <span class="hljs-attr">&quot;board_cards_count&quot;</span>: <span class="hljs-number">0</span>
+}
+</code></pre>
+<h3 id="get_board_cards_count-responses">Responses</h3>
+<table>
+<thead>
+<tr>
+<th>Status</th>
+<th>Meaning</th>
+<th>Description</th>
+<th>Schema</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>200</td>
+<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td>
+<td>200 response</td>
+<td>Inline</td>
+</tr>
+</tbody>
+</table>
+<h3 id="get_board_cards_count-responseschema">Response Schema</h3>
+<p>Status Code <strong>200</strong></p>
+<table>
+<thead>
+<tr>
+<th>Name</th>
+<th>Type</th>
+<th>Required</th>
+<th>Restrictions</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>» board_cards_count</td>
+<td>integer</td>
+<td>false</td>
+<td>none</td>
+<td>none</td>
+</tr>
+</tbody>
+</table>
+<aside class="warning">
+To perform this operation, you must be authenticated by means of one of the following methods:
+UserSecurity
+</aside>
 <h2 id="get_all_cards">get_all_cards</h2>
 <p><a id="opIdget_all_cards"></a></p>
 <blockquote>
@@ -8481,7 +8716,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-21">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-22">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>list</strong>: the list ID</p>
 <blockquote>
@@ -8814,7 +9049,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-22">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-23">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID of the new card</p>
 <p><strong>list</strong>: the list ID of the new card</p>
 <blockquote>
@@ -9054,7 +9289,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-23">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-24">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>list</strong>: the list ID of the card</p>
 <p><strong>card</strong>: the card ID</p>
@@ -9618,7 +9853,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-24">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-25">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID of the card</p>
 <p><strong>list</strong>: the list ID of the card</p>
 <p><strong>card</strong>: the ID of the card</p>
@@ -9861,7 +10096,7 @@ is not put in the recycle bin.</p>
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-25">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-26">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID of the card</p>
 <p><strong>list</strong>: the list ID of the card</p>
 <p><strong>card</strong>: the ID of the card</p>
@@ -9920,6 +10155,239 @@ is not put in the recycle bin.</p>
 To perform this operation, you must be authenticated by means of one of the following methods:
 UserSecurity
 </aside>
+<h2 id="get_list_cards_count">get_list_cards_count</h2>
+<p><a id="opIdget_list_cards_count"></a></p>
+<blockquote>
+<p>Code samples</p>
+</blockquote>
+<pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span>
+curl -X GET /api/boards/{board}/lists/{list}/cards_count \
+  -H <span class="hljs-string">&#x27;Accept: application/json&#x27;</span> \
+  -H <span class="hljs-string">&#x27;Authorization: API_KEY&#x27;</span>
+
+</code></pre>
+<pre class="highlight tab tab-http"><code><span class="hljs-keyword">GET</span> <span class="hljs-string">/api/boards/{board}/lists/{list}/cards_count</span> <span class="hljs-meta">HTTP/1.1</span>
+
+<span class="ada"><span class="hljs-keyword">Accept</span>: application/json
+
+</span></code></pre>
+<pre class="highlight tab tab-javascript"><code>
+<span class="hljs-keyword">const</span> headers = {
+  <span class="hljs-string">&#x27;Accept&#x27;</span>:<span class="hljs-string">&#x27;application/json&#x27;</span>,
+  <span class="hljs-string">&#x27;Authorization&#x27;</span>:<span class="hljs-string">&#x27;API_KEY&#x27;</span>
+};
+
+fetch(<span class="hljs-string">&#x27;/api/boards/{board}/lists/{list}/cards_count&#x27;</span>,
+{
+  <span class="hljs-attr">method</span>: <span class="hljs-string">&#x27;GET&#x27;</span>,
+
+  <span class="hljs-attr">headers</span>: headers
+})
+.then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) </span>{
+    <span class="hljs-keyword">return</span> res.json();
+}).then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">body</span>) </span>{
+    <span class="hljs-built_in">console</span>.log(body);
+});
+
+</code></pre>
+<pre class="highlight tab tab-javascript--nodejs"><code><span class="hljs-keyword">const</span> fetch = <span class="hljs-built_in">require</span>(<span class="hljs-string">&#x27;node-fetch&#x27;</span>);
+
+<span class="hljs-keyword">const</span> headers = {
+  <span class="hljs-string">&#x27;Accept&#x27;</span>:<span class="hljs-string">&#x27;application/json&#x27;</span>,
+  <span class="hljs-string">&#x27;Authorization&#x27;</span>:<span class="hljs-string">&#x27;API_KEY&#x27;</span>
+};
+
+fetch(<span class="hljs-string">&#x27;/api/boards/{board}/lists/{list}/cards_count&#x27;</span>,
+{
+  <span class="hljs-attr">method</span>: <span class="hljs-string">&#x27;GET&#x27;</span>,
+
+  <span class="hljs-attr">headers</span>: headers
+})
+.then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) </span>{
+    <span class="hljs-keyword">return</span> res.json();
+}).then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">body</span>) </span>{
+    <span class="hljs-built_in">console</span>.log(body);
+});
+
+</code></pre>
+<pre class="highlight tab tab-ruby"><code><span class="hljs-keyword">require</span> <span class="hljs-string">&#x27;rest-client&#x27;</span>
+<span class="hljs-keyword">require</span> <span class="hljs-string">&#x27;json&#x27;</span>
+
+headers = {
+  <span class="hljs-string">&#x27;Accept&#x27;</span> =&gt; <span class="hljs-string">&#x27;application/json&#x27;</span>,
+  <span class="hljs-string">&#x27;Authorization&#x27;</span> =&gt; <span class="hljs-string">&#x27;API_KEY&#x27;</span>
+}
+
+result = RestClient.get <span class="hljs-string">&#x27;/api/boards/{board}/lists/{list}/cards_count&#x27;</span>,
+  <span class="hljs-symbol">params:</span> {
+  }, <span class="hljs-symbol">headers:</span> headers
+
+p JSON.parse(result)
+
+</code></pre>
+<pre class="highlight tab tab-python"><code><span class="hljs-keyword">import</span> requests
+headers = {
+  <span class="hljs-string">&#x27;Accept&#x27;</span>: <span class="hljs-string">&#x27;application/json&#x27;</span>,
+  <span class="hljs-string">&#x27;Authorization&#x27;</span>: <span class="hljs-string">&#x27;API_KEY&#x27;</span>
+}
+
+r = requests.get(<span class="hljs-string">&#x27;/api/boards/{board}/lists/{list}/cards_count&#x27;</span>, headers = headers)
+
+<span class="hljs-built_in">print</span>(r.json())
+
+</code></pre>
+<pre class="highlight tab tab-java"><code>URL obj = <span class="hljs-keyword">new</span> URL(<span class="hljs-string">&quot;/api/boards/{board}/lists/{list}/cards_count&quot;</span>);
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod(<span class="hljs-string">&quot;GET&quot;</span>);
+<span class="hljs-keyword">int</span> responseCode = con.getResponseCode();
+BufferedReader in = <span class="hljs-keyword">new</span> BufferedReader(
+    <span class="hljs-keyword">new</span> InputStreamReader(con.getInputStream()));
+String inputLine;
+StringBuffer response = <span class="hljs-keyword">new</span> StringBuffer();
+<span class="hljs-keyword">while</span> ((inputLine = in.readLine()) != <span class="hljs-keyword">null</span>) {
+    response.append(inputLine);
+}
+in.close();
+System.out.println(response.toString());
+
+</code></pre>
+<pre class="highlight tab tab-go"><code><span class="hljs-keyword">package</span> main
+
+<span class="hljs-keyword">import</span> (
+       <span class="hljs-string">&quot;bytes&quot;</span>
+       <span class="hljs-string">&quot;net/http&quot;</span>
+)
+
+<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span> {
+
+    headers := <span class="hljs-keyword">map</span>[<span class="hljs-keyword">string</span>][]<span class="hljs-keyword">string</span>{
+        <span class="hljs-string">&quot;Accept&quot;</span>: []<span class="hljs-keyword">string</span>{<span class="hljs-string">&quot;application/json&quot;</span>},
+        <span class="hljs-string">&quot;Authorization&quot;</span>: []<span class="hljs-keyword">string</span>{<span class="hljs-string">&quot;API_KEY&quot;</span>},
+    }
+
+    data := bytes.NewBuffer([]<span class="hljs-keyword">byte</span>{jsonReq})
+    req, err := http.NewRequest(<span class="hljs-string">&quot;GET&quot;</span>, <span class="hljs-string">&quot;/api/boards/{board}/lists/{list}/cards_count&quot;</span>, data)
+    req.Header = headers
+
+    client := &amp;http.Client{}
+    resp, err := client.Do(req)
+    <span class="hljs-comment">// ...</span>
+}
+
+</code></pre>
+<pre class="highlight tab tab-php"><code> <span class="hljs-string">&#x27;application/json&#x27;</span>,
+    <span class="hljs-string">&#x27;Authorization&#x27;</span> =&gt; <span class="hljs-string">&#x27;API_KEY&#x27;</span>,
+);
+
+<span class="hljs-variable">$client</span> = <span class="hljs-keyword">new</span> \GuzzleHttp\Client();
+
+<span class="hljs-comment">// Define array of request body.</span>
+<span class="hljs-variable">$request_body</span> = <span class="hljs-keyword">array</span>();
+
+<span class="hljs-keyword">try</span> {
+    <span class="hljs-variable">$response</span> = <span class="hljs-variable">$client</span>-&gt;request(<span class="hljs-string">&#x27;GET&#x27;</span>,<span class="hljs-string">&#x27;/api/boards/{board}/lists/{list}/cards_count&#x27;</span>, <span class="hljs-keyword">array</span>(
+        <span class="hljs-string">&#x27;headers&#x27;</span> =&gt; <span class="hljs-variable">$headers</span>,
+        <span class="hljs-string">&#x27;json&#x27;</span> =&gt; <span class="hljs-variable">$request_body</span>,
+       )
+    );
+    print_r(<span class="hljs-variable">$response</span>-&gt;getBody()-&gt;getContents());
+ }
+ <span class="hljs-keyword">catch</span> (\GuzzleHttp\<span class="hljs-built_in">Exception</span>\BadResponseException <span class="hljs-variable">$e</span>) {
+    <span class="hljs-comment">// handle exception or api errors.</span>
+    print_r(<span class="hljs-variable">$e</span>-&gt;getMessage());
+ }
+
+ <span class="hljs-comment">// ...</span>
+
+</code></pre>
+<p><code>GET /api/boards/{board}/lists/{list}/cards_count</code></p>
+<p><em>Get a cards count to a list</em></p>
+<h3 id="get_list_cards_count-parameters">Parameters</h3>
+<table>
+<thead>
+<tr>
+<th>Name</th>
+<th>In</th>
+<th>Type</th>
+<th>Required</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>board</td>
+<td>path</td>
+<td>string</td>
+<td>true</td>
+<td>the board ID</td>
+</tr>
+<tr>
+<td>list</td>
+<td>path</td>
+<td>string</td>
+<td>true</td>
+<td>the List ID</td>
+</tr>
+</tbody>
+</table>
+<h4 id="detailed-descriptions-27">Detailed descriptions</h4>
+<p><strong>board</strong>: the board ID</p>
+<p><strong>list</strong>: the List ID</p>
+<blockquote>
+<p>Example responses</p>
+</blockquote>
+<blockquote>
+<p>200 Response</p>
+</blockquote>
+<pre class="highlight tab tab-json"><code>{
+  <span class="hljs-attr">&quot;list_cards_count&quot;</span>: <span class="hljs-number">0</span>
+}
+</code></pre>
+<h3 id="get_list_cards_count-responses">Responses</h3>
+<table>
+<thead>
+<tr>
+<th>Status</th>
+<th>Meaning</th>
+<th>Description</th>
+<th>Schema</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>200</td>
+<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td>
+<td>200 response</td>
+<td>Inline</td>
+</tr>
+</tbody>
+</table>
+<h3 id="get_list_cards_count-responseschema">Response Schema</h3>
+<p>Status Code <strong>200</strong></p>
+<table>
+<thead>
+<tr>
+<th>Name</th>
+<th>Type</th>
+<th>Required</th>
+<th>Restrictions</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>» list_cards_count</td>
+<td>integer</td>
+<td>false</td>
+<td>none</td>
+<td>none</td>
+</tr>
+</tbody>
+</table>
+<aside class="warning">
+To perform this operation, you must be authenticated by means of one of the following methods:
+UserSecurity
+</aside>
 <h2 id="get_swimlane_cards">get_swimlane_cards</h2>
 <p><a id="opIdget_swimlane_cards"></a></p>
 <blockquote>
@@ -10095,7 +10563,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-26">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-28">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>swimlane</strong>: the swimlane ID</p>
 <blockquote>
@@ -10921,7 +11389,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-27">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-29">Detailed descriptions</h4>
 <p><strong>customField</strong>: the ID of the custom field</p>
 <blockquote>
 <p>Example responses</p>
@@ -11496,7 +11964,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-28">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-30">Detailed descriptions</h4>
 <p><strong>customField</strong>: the ID of the custom field</p>
 <blockquote>
 <p>Example responses</p>
@@ -12490,7 +12958,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-29">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-31">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <blockquote>
 <p>Example responses</p>
@@ -12830,7 +13298,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-30">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-32">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <blockquote>
 <p>Example responses</p>
@@ -13062,7 +13530,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-31">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-33">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>int</strong>: the integration ID</p>
 <blockquote>
@@ -13356,7 +13824,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-32">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-34">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>int</strong>: the integration ID</p>
 <blockquote>
@@ -13589,7 +14057,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-33">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-35">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>int</strong>: the integration ID</p>
 <blockquote>
@@ -13822,7 +14290,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-34">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-36">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>int</strong>: the integration ID</p>
 <blockquote>
@@ -14076,7 +14544,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-35">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-37">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>int</strong>: the integration ID</p>
 <blockquote>
@@ -14292,7 +14760,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-36">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-38">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <blockquote>
 <p>Example responses</p>
@@ -14559,7 +15027,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-37">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-39">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <blockquote>
 <p>Example responses</p>
@@ -14791,7 +15259,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-38">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-40">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>list</strong>: the List ID</p>
 <blockquote>
@@ -15020,7 +15488,7 @@ The list is not put in the recycle bin.</p>
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-39">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-41">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>list</strong>: the ID of the list to remove</p>
 <blockquote>
@@ -15319,7 +15787,7 @@ to later change the permissions.</p>
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-40">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-42">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>user</strong>: the user ID</p>
 <blockquote>
@@ -15593,7 +16061,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-41">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-43">Detailed descriptions</h4>
 <p><strong>board</strong>: the board ID</p>
 <p><strong>user</strong>: the user ID</p>
 <blockquote>
@@ -15828,7 +16296,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-42">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-44">Detailed descriptions</h4>
 <p><strong>user</strong>: the ID of the user to create token for.</p>
 <blockquote>
 <p>Example responses</p>
@@ -16787,7 +17255,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-43">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-45">Detailed descriptions</h4>
 <p><strong>user</strong>: the user ID or username</p>
 <blockquote>
 <p>Example responses</p>
@@ -17100,7 +17568,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-44">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-46">Detailed descriptions</h4>
 <p><strong>user</strong>: the user ID</p>
 <blockquote>
 <p>Example responses</p>
@@ -17334,7 +17802,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-45">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-47">Detailed descriptions</h4>
 <p><strong>user</strong>: the ID of the user to delete</p>
 <blockquote>
 <p>Example responses</p>
@@ -17560,7 +18028,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-46">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-48">Detailed descriptions</h4>
 <p><strong>board</strong>: the ID of the board</p>
 <blockquote>
 <p>Example responses</p>
@@ -17827,7 +18295,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-47">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-49">Detailed descriptions</h4>
 <p><strong>board</strong>: the ID of the board</p>
 <blockquote>
 <p>Example responses</p>
@@ -18059,7 +18527,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-48">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-50">Detailed descriptions</h4>
 <p><strong>board</strong>: the ID of the board</p>
 <p><strong>swimlane</strong>: the ID of the swimlane</p>
 <blockquote>
@@ -18280,7 +18748,7 @@ System.out.println(response.toString());
 </tr>
 </tbody>
 </table>
-<h4 id="detailed-descriptions-49">Detailed descriptions</h4>
+<h4 id="detailed-descriptions-51">Detailed descriptions</h4>
 <p><strong>board</strong>: the ID of the board</p>
 <p><strong>swimlane</strong>: the ID of the swimlane</p>
 <blockquote>

+ 59 - 1
public/api/wekan.yml

@@ -1,7 +1,7 @@
 swagger: '2.0'
 info:
   title: Wekan REST API
-  version: v6.12
+  version: v6.13
   description: |
     The REST API allows you to control and extend Wekan with ease.
 
@@ -884,6 +884,32 @@ paths:
                   type: string
                 swinlaneId:
                   type: string
+  /api/boards/{board}/cards_count:
+    get:
+      operationId: get_board_cards_count
+      summary: Get a cards count to a board
+      tags:
+        - Cards
+      parameters:
+        - name: board
+          in: path
+          description: |
+            the board ID
+          type: string
+          required: true
+      produces:
+        - application/json
+      security:
+          - UserSecurity: []
+      responses:
+        '200':
+          description: |-
+            200 response
+          schema:
+            type: object
+            properties:
+              board_cards_count:
+                type: integer
   /api/boards/{board}/custom-fields:
     get:
       operationId: get_all_custom_fields
@@ -2054,6 +2080,38 @@ paths:
             properties:
               _id:
                 type: string
+  /api/boards/{board}/lists/{list}/cards_count:
+    get:
+      operationId: get_list_cards_count
+      summary: Get a cards count to a list
+      tags:
+        - Cards
+      parameters:
+        - name: board
+          in: path
+          description: |
+            the board ID
+          type: string
+          required: true
+        - name: list
+          in: path
+          description: |
+            the List ID
+          type: string
+          required: true
+      produces:
+        - application/json
+      security:
+          - UserSecurity: []
+      responses:
+        '200':
+          description: |-
+            200 response
+          schema:
+            type: object
+            properties:
+              list_cards_count:
+                type: integer
   /api/boards/{board}/members/{member}:
     post:
       operationId: set_board_member_permission

+ 2 - 2
sandstorm-pkgdef.capnp

@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
     appTitle = (defaultText = "Wekan"),
     # The name of the app as it is displayed to the user.
 
-    appVersion = 612,
+    appVersion = 613,
     # Increment this for every release.
 
-    appMarketingVersion = (defaultText = "6.12.0~2022-03-11"),
+    appMarketingVersion = (defaultText = "6.13.0~2022-04-01"),
     # Human-readable presentation of the app version.
 
     minUpgradableAppVersion = 0,

+ 1 - 1
snapcraft.yaml

@@ -1,5 +1,5 @@
 name: wekan
-version: '6.12'
+version: '6.13'
 summary: Open Source kanban
 description: |
    WeKan ® is an Open Source and collaborative kanban board application.