Wekan REST API v6.12
+Wekan REST API v6.13
@@ -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 +Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
get_board_cards_count
+ +++Code samples
+
# You can also use wget
+curl -X GET /api/boards/{board}/cards_count \
+ -H 'Accept: application/json' \
+ -H 'Authorization: API_KEY'
+
+
+GET /api/boards/{board}/cards_count HTTP/1.1
+
+Accept: application/json
+
+
+
+const headers = {
+ 'Accept':'application/json',
+ 'Authorization':'API_KEY'
+};
+
+fetch('/api/boards/{board}/cards_count',
+{
+ method: 'GET',
+
+ headers: headers
+})
+.then(function(res) {
+ return res.json();
+}).then(function(body) {
+ console.log(body);
+});
+
+
+const fetch = require('node-fetch');
+
+const headers = {
+ 'Accept':'application/json',
+ 'Authorization':'API_KEY'
+};
+
+fetch('/api/boards/{board}/cards_count',
+{
+ method: 'GET',
+
+ headers: headers
+})
+.then(function(res) {
+ return res.json();
+}).then(function(body) {
+ console.log(body);
+});
+
+
+require 'rest-client'
+require 'json'
+
+headers = {
+ 'Accept' => 'application/json',
+ 'Authorization' => 'API_KEY'
+}
+
+result = RestClient.get '/api/boards/{board}/cards_count',
+ params: {
+ }, headers: headers
+
+p JSON.parse(result)
+
+
+import requests
+headers = {
+ 'Accept': 'application/json',
+ 'Authorization': 'API_KEY'
+}
+
+r = requests.get('/api/boards/{board}/cards_count', headers = headers)
+
+print(r.json())
+
+
+URL obj = new URL("/api/boards/{board}/cards_count");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("GET");
+int responseCode = con.getResponseCode();
+BufferedReader in = new BufferedReader(
+ new InputStreamReader(con.getInputStream()));
+String inputLine;
+StringBuffer response = new StringBuffer();
+while ((inputLine = in.readLine()) != null) {
+ response.append(inputLine);
+}
+in.close();
+System.out.println(response.toString());
+
+
+package main
+
+import (
+ "bytes"
+ "net/http"
+)
+
+func main() {
+
+ headers := map[string][]string{
+ "Accept": []string{"application/json"},
+ "Authorization": []string{"API_KEY"},
+ }
+
+ data := bytes.NewBuffer([]byte{jsonReq})
+ req, err := http.NewRequest("GET", "/api/boards/{board}/cards_count", data)
+ req.Header = headers
+
+ client := &http.Client{}
+ resp, err := client.Do(req)
+ // ...
+}
+
+
+ 'application/json',
+ 'Authorization' => 'API_KEY',
+);
+
+$client = new \GuzzleHttp\Client();
+
+// Define array of request body.
+$request_body = array();
+
+try {
+ $response = $client->request('GET','/api/boards/{board}/cards_count', array(
+ 'headers' => $headers,
+ 'json' => $request_body,
+ )
+ );
+ print_r($response->getBody()->getContents());
+ }
+ catch (\GuzzleHttp\Exception\BadResponseException $e) {
+ // handle exception or api errors.
+ print_r($e->getMessage());
+ }
+
+ // ...
+
+
+GET /api/boards/{board}/cards_count
Get a cards count to a board
+Parameters
+| Name | +In | +Type | +Required | +Description | +
|---|---|---|---|---|
| board | +path | +string | +true | +the board ID | +
Detailed descriptions
+board: the board ID
+++Example responses
+
++200 Response
+
{
+ "board_cards_count": 0
+}
+
+Responses
+| Status | +Meaning | +Description | +Schema | +
|---|---|---|---|
| 200 | +OK | +200 response | +Inline | +
Response Schema
+Status Code 200
+| Name | +Type | +Required | +Restrictions | +Description | +
|---|---|---|---|---|
| » board_cards_count | +integer | +false | +none | +none | +
get_all_cards
@@ -8481,7 +8716,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
list: the list ID
@@ -8814,7 +9049,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID of the new card
list: the list ID of the new card
@@ -9054,7 +9289,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
list: the list ID of the card
card: the card ID
@@ -9618,7 +9853,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID of the card
list: the list ID of the card
card: the ID of the card
@@ -9861,7 +10096,7 @@ is not put in the recycle bin. -Detailed descriptions
+Detailed descriptions
board: the board ID of the card
list: the list ID of the card
card: the ID of the card
@@ -9920,6 +10155,239 @@ is not put in the recycle bin. To perform this operation, you must be authenticated by means of one of the following methods: UserSecurity +get_list_cards_count
+ +++Code samples
++# You can also use wget +curl -X GET /api/boards/{board}/lists/{list}/cards_count \ + -H 'Accept: application/json' \ + -H 'Authorization: API_KEY' + ++GET /api/boards/{board}/lists/{list}/cards_count HTTP/1.1 + +Accept: application/json + +++const headers = { + 'Accept':'application/json', + 'Authorization':'API_KEY' +}; + +fetch('/api/boards/{board}/lists/{list}/cards_count', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + ++const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'Authorization':'API_KEY' +}; + +fetch('/api/boards/{board}/lists/{list}/cards_count', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + ++require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'Authorization' => 'API_KEY' +} + +result = RestClient.get '/api/boards/{board}/lists/{list}/cards_count', + params: { + }, headers: headers + +p JSON.parse(result) + ++import requests +headers = { + 'Accept': 'application/json', + 'Authorization': 'API_KEY' +} + +r = requests.get('/api/boards/{board}/lists/{list}/cards_count', headers = headers) + +print(r.json()) + ++URL obj = new URL("/api/boards/{board}/lists/{list}/cards_count"); +HttpURLConnection con = (HttpURLConnection) obj.openConnection(); +con.setRequestMethod("GET"); +int responseCode = con.getResponseCode(); +BufferedReader in = new BufferedReader( + new InputStreamReader(con.getInputStream())); +String inputLine; +StringBuffer response = new StringBuffer(); +while ((inputLine = in.readLine()) != null) { + response.append(inputLine); +} +in.close(); +System.out.println(response.toString()); + ++package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "Authorization": []string{"API_KEY"}, + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "/api/boards/{board}/lists/{list}/cards_count", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + ++'application/json', + 'Authorization' => 'API_KEY', +); + +$client = new \GuzzleHttp\Client(); + +// Define array of request body. +$request_body = array(); + +try { + $response = $client->request('GET','/api/boards/{board}/lists/{list}/cards_count', array( + 'headers' => $headers, + 'json' => $request_body, + ) + ); + print_r($response->getBody()->getContents()); + } + catch (\GuzzleHttp\Exception\BadResponseException $e) { + // handle exception or api errors. + print_r($e->getMessage()); + } + + // ... + ++
GET /api/boards/{board}/lists/{list}/cards_countGet a cards count to a list
+Parameters
++ +
++ + + +Name +In +Type +Required +Description ++ +board +path +string +true +the board ID ++ + +list +path +string +true +the List ID +Detailed descriptions
+board: the board ID
+list: the List ID
+++Example responses
+++200 Response
++{ + "list_cards_count": 0 +} +Responses
++ +
++ + + +Status +Meaning +Description +Schema ++ + +200 +OK +200 response +Inline +Response Schema
+Status Code 200
++ +
++ + + +Name +Type +Required +Restrictions +Description ++ + +» list_cards_count +integer +false +none +none +get_swimlane_cards
@@ -10095,7 +10563,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
swimlane: the swimlane ID
@@ -10921,7 +11389,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
customField: the ID of the custom field
Example responses
@@ -11496,7 +11964,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
customField: the ID of the custom field
Example responses
@@ -12490,7 +12958,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
Example responses
@@ -12830,7 +13298,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
Example responses
@@ -13062,7 +13530,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
int: the integration ID
@@ -13356,7 +13824,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
int: the integration ID
@@ -13589,7 +14057,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
int: the integration ID
@@ -13822,7 +14290,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
int: the integration ID
@@ -14076,7 +14544,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
int: the integration ID
@@ -14292,7 +14760,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
Example responses
@@ -14559,7 +15027,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
Example responses
@@ -14791,7 +15259,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
list: the List ID
@@ -15020,7 +15488,7 @@ The list is not put in the recycle bin. -Detailed descriptions
+Detailed descriptions
board: the board ID
list: the ID of the list to remove
@@ -15319,7 +15787,7 @@ to later change the permissions. -Detailed descriptions
+Detailed descriptions
board: the board ID
user: the user ID
@@ -15593,7 +16061,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the board ID
user: the user ID
@@ -15828,7 +16296,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
user: the ID of the user to create token for.
Example responses
@@ -16787,7 +17255,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
user: the user ID or username
Example responses
@@ -17100,7 +17568,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
user: the user ID
Example responses
@@ -17334,7 +17802,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
user: the ID of the user to delete
Example responses
@@ -17560,7 +18028,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the ID of the board
Example responses
@@ -17827,7 +18295,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the ID of the board
Example responses
@@ -18059,7 +18527,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the ID of the board
swimlane: the ID of the swimlane
@@ -18280,7 +18748,7 @@ System.out.println(response.toString()); -Detailed descriptions
+Detailed descriptions
board: the ID of the board
swimlane: the ID of the swimlane
diff --git a/public/api/wekan.yml b/public/api/wekan.yml index 9fcf15323..162b9db3d 100644 --- a/public/api/wekan.yml +++ b/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 diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index fd41140c6..81b3f09eb 100644 --- a/sandstorm-pkgdef.capnp +++ b/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, diff --git a/snapcraft.yaml b/snapcraft.yaml index 37c964e68..e746e1608 100644 --- a/snapcraft.yaml +++ b/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.