From 9ae20a3f51e63c29f536e2f5b3e66a2c7d88c691 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Tue, 28 Apr 2020 03:24:18 +0300 Subject: [PATCH] Fix Cards and Users docs not generated because of syntax error and new Javascript syntax. Wekan uses wekan/releases/generate-docs*.sh Python code to generate OpenAPI docs, it did not show any errors while generating docs, only left out parts of API docs. Thanks to pvcon13 and xet7 ! --- models/cards.js | 5 +- models/users.js | 2 +- public/api/wekan.html | 4684 ++++++++++++++++++++++++++++++++++++++--- public/api/wekan.yml | 999 +++++++++ 4 files changed, 5433 insertions(+), 257 deletions(-) diff --git a/models/cards.js b/models/cards.js index 72153132d..4197f7ab8 100644 --- a/models/cards.js +++ b/models/cards.js @@ -1053,6 +1053,7 @@ Cards.helpers({ return Users.find({ _id: { $in: this.vote.positive } }); return []; }, + voteMemberNegative() { if (this.vote && this.vote.negative) return Users.find({ _id: { $in: this.vote.negative } }); @@ -1475,12 +1476,12 @@ Cards.mutations({ }, }; }, - setVoteQuestion(question, public) { + setVoteQuestion(question, publicVote) { return { $set: { vote: { question, - public, + public: publicVote, positive: [], negative: [], }, diff --git a/models/users.js b/models/users.js index ebb14f5fc..2d84141cb 100644 --- a/models/users.js +++ b/models/users.js @@ -531,7 +531,7 @@ Users.helpers({ getStartDayOfWeek() { const profile = this.profile || {}; // default is 'Monday' (1) - return profile.startDayOfWeek ?? 1; + return profile.startDayOfWeek || 1; }, getTemplatesBoardId() { diff --git a/public/api/wekan.html b/public/api/wekan.html index 49cf0b3b2..38188deb3 100644 --- a/public/api/wekan.html +++ b/public/api/wekan.html @@ -1458,12 +1458,12 @@ Darkula color scheme from the JetBrains family of IDEs opacity: 0.5; } - + - + @@ -1477,429 +1477,547 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
- +
- - + + Shell - - - + + + HTTP - - - + + + JavaScript - - - + + + Node.js - - - + + + Ruby - - - + + + Python - - - + + + Java - - - + + + Go - - + +
- - + + - +
- + - +
@@ -2042,7 +2160,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Content-Type": []string{"application/x-www-form-urlencoded"}, "Accept": []string{"*/*"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -2317,7 +2435,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Content-Type": []string{"application/x-www-form-urlencoded"}, "Accept": []string{"*/*"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -2600,7 +2718,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -2806,7 +2924,7 @@ System.out.println(response.toString()); "Content-Type": []string{"multipart/form-data"}, "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -3101,7 +3219,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -3326,7 +3444,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -3488,7 +3606,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -3671,7 +3789,7 @@ System.out.println(response.toString()); "Content-Type": []string{"multipart/form-data"}, "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -3876,7 +3994,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Content-Type": []string{"multipart/form-data"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -4098,7 +4216,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -4303,7 +4421,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -4480,7 +4598,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Content-Type": []string{"multipart/form-data"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -4674,7 +4792,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -4847,7 +4965,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -5021,7 +5139,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -5212,7 +5330,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Content-Type": []string{"multipart/form-data"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -5420,7 +5538,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -5609,7 +5727,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -5840,7 +5958,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Content-Type": []string{"multipart/form-data"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -6034,7 +6152,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -6207,7 +6325,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -6389,7 +6507,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -6622,7 +6740,7 @@ System.out.println(response.toString()); "Content-Type": []string{"multipart/form-data"}, "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -6882,7 +7000,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -7048,7 +7166,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -7223,7 +7341,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -7517,7 +7635,7 @@ System.out.println(response.toString()); "Content-Type": []string{"multipart/form-data"}, "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -7739,7 +7857,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -7951,7 +8069,7 @@ System.out.println(response.toString()); "Content-Type": []string{"multipart/form-data"}, "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -8213,7 +8331,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -8415,7 +8533,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -8591,7 +8709,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Content-Type": []string{"multipart/form-data"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -8786,7 +8904,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -9007,7 +9125,7 @@ System.out.println(response.toString()); "Content-Type": []string{"multipart/form-data"}, "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -9229,7 +9347,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -9432,7 +9550,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -9535,6 +9653,3176 @@ The list is not put in the recycle bin.

To perform this operation, you must be authenticated by means of one of the following methods: UserSecurity +

Cards

+

get_all_cards

+

+
+

Code samples

+
+
# You can also use wget
+curl -X GET /api/boards/{board}/lists/{list}/cards \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
GET /api/boards/{board}/lists/{list}/cards HTTP/1.1
+
+Accept: application/json
+
+
+
var headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/boards/{board}/lists/{list}/cards',
+  method: 'get',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+
+const headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/boards/{board}/lists/{list}/cards',
+{
+  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',
+  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', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/boards/{board}/lists/{list}/cards");
+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", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

GET /api/boards/{board}/lists/{list}/cards

+

Get all Cards attached to a List

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board ID
listpathstringtruethe list ID
+

Detailed descriptions

+

board: the board ID

+

list: the list ID

+
+

Example responses

+
+
+

200 Response

+
+
[
+  {
+    "_id": "string",
+    "title": "string",
+    "description": "string"
+  }
+]
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
» titlestringfalsenonenone
» descriptionstringfalsenonenone
+ +

new_card

+

+
+

Code samples

+
+
# You can also use wget
+curl -X POST /api/boards/{board}/lists/{list}/cards \
+  -H 'Content-Type: multipart/form-data' \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
POST /api/boards/{board}/lists/{list}/cards HTTP/1.1
+
+Content-Type: multipart/form-data
+Accept: application/json
+
+
+
var headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/boards/{board}/lists/{list}/cards',
+  method: 'post',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+const inputBody = '{
+  "authorId": "string",
+  "members": "string",
+  "assignees": "string",
+  "title": "string",
+  "description": "string",
+  "swimlaneId": "string"
+}';
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/boards/{board}/lists/{list}/cards',
+{
+  method: 'POST',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Content-Type' => 'multipart/form-data',
+  'Accept' => 'application/json',
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.post '/api/boards/{board}/lists/{list}/cards',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Content-Type': 'multipart/form-data',
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.post('/api/boards/{board}/lists/{list}/cards', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/boards/{board}/lists/{list}/cards");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("POST");
+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{
+        "Content-Type": []string{"multipart/form-data"},
+        "Accept": []string{"application/json"},
+        "Authorization": []string{"API_KEY"},
+        
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("POST", "/api/boards/{board}/lists/{list}/cards", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

POST /api/boards/{board}/lists/{list}/cards

+

Create a new Card

+
+

Body parameter

+
+
authorId: string
+members: string
+assignees: string
+title: string
+description: string
+swimlaneId: string
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board ID of the new card
listpathstringtruethe list ID of the new card
bodybodyobjectfalsenone
» authorIdbodystringtruethe authorId value
» membersbodystringfalsethe member IDs list of the new card
» assigneesbodystringfalsethe array of maximum one ID of assignee of the new card
» titlebodystringtruethe title of the new card
» descriptionbodystringtruethe description of the new card
» swimlaneIdbodystringtruethe swimlane ID of the new card
+

Detailed descriptions

+

board: the board ID of the new card

+

list: the list ID of the new card

+
+

Example responses

+
+
+

200 Response

+
+
{
+  "_id": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
+ +

get_board_list_card

+

+
+

Code samples

+
+
# You can also use wget
+curl -X GET /api/boards/{board}/lists/{list}/cards/{card} \
+  -H 'Authorization: API_KEY'
+
+
+
GET /api/boards/{board}/lists/{list}/cards/{card} HTTP/1.1
+
+
+
var headers = {
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/boards/{board}/lists/{list}/cards/{card}',
+  method: 'get',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+
+const headers = {
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/boards/{board}/lists/{list}/cards/{card}',
+{
+  method: 'GET',
+
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.get '/api/boards/{board}/lists/{list}/cards/{card}',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Authorization': 'API_KEY'
+}
+
+r = requests.get('/api/boards/{board}/lists/{list}/cards/{card}', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/boards/{board}/lists/{list}/cards/{card}");
+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{
+        "Authorization": []string{"API_KEY"},
+        
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("GET", "/api/boards/{board}/lists/{list}/cards/{card}", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

GET /api/boards/{board}/lists/{list}/cards/{card}

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board value
listpathstringtruethe list value
cardpathstringtruethe card value
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseNone
+ +

put_board_list_card

+

+
+

Code samples

+
+
# You can also use wget
+curl -X PUT /api/boards/{board}/lists/{list}/cards/{card} \
+  -H 'Content-Type: multipart/form-data' \
+  -H 'Authorization: API_KEY'
+
+
+
PUT /api/boards/{board}/lists/{list}/cards/{card} HTTP/1.1
+
+Content-Type: multipart/form-data
+
+
+
var headers = {
+  'Content-Type':'multipart/form-data',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/boards/{board}/lists/{list}/cards/{card}',
+  method: 'put',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+const inputBody = '{
+  "title": "string",
+  "listId": "string",
+  "authorId": "string",
+  "parentId": "string",
+  "description": "string",
+  "color": "string",
+  "labelIds": "string",
+  "requestedBy": "string",
+  "assignedBy": "string",
+  "receivedAt": "string",
+  "startAt": "string",
+  "dueAt": "string",
+  "endAt": "string",
+  "spentTime": "string",
+  "isOverTime": "string",
+  "customFields": "string",
+  "members": "string",
+  "assignees": "string",
+  "swimlaneId": "string"
+}';
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/boards/{board}/lists/{list}/cards/{card}',
+{
+  method: 'PUT',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Content-Type' => 'multipart/form-data',
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.put '/api/boards/{board}/lists/{list}/cards/{card}',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Content-Type': 'multipart/form-data',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.put('/api/boards/{board}/lists/{list}/cards/{card}', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/boards/{board}/lists/{list}/cards/{card}");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("PUT");
+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{
+        "Content-Type": []string{"multipart/form-data"},
+        "Authorization": []string{"API_KEY"},
+        
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("PUT", "/api/boards/{board}/lists/{list}/cards/{card}", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

PUT /api/boards/{board}/lists/{list}/cards/{card}

+
+

Body parameter

+
+
title: string
+listId: string
+authorId: string
+parentId: string
+description: string
+color: string
+labelIds: string
+requestedBy: string
+assignedBy: string
+receivedAt: string
+startAt: string
+dueAt: string
+endAt: string
+spentTime: string
+isOverTime: string
+customFields: string
+members: string
+assignees: string
+swimlaneId: string
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board value
listpathstringtruethe list value
cardpathstringtruethe card value
bodybodyobjectfalsenone
» titlebodystringtruethe title value
» listIdbodystringtruethe listId value
» authorIdbodystringtruethe authorId value
» parentIdbodystringtruethe parentId value
» descriptionbodystringtruethe description value
» colorbodystringtruethe color value
» labelIdsbodystringtruethe labelIds value
» requestedBybodystringtruethe requestedBy value
» assignedBybodystringtruethe assignedBy value
» receivedAtbodystringtruethe receivedAt value
» startAtbodystringtruethe startAt value
» dueAtbodystringtruethe dueAt value
» endAtbodystringtruethe endAt value
» spentTimebodystringtruethe spentTime value
» isOverTimebodystringtruethe isOverTime value
» customFieldsbodystringtruethe customFields value
» membersbodystringtruethe members value
» assigneesbodystringtruethe assignees value
» swimlaneIdbodystringtruethe swimlaneId value
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseNone
+ +

delete_board_list_card

+

+
+

Code samples

+
+
# You can also use wget
+curl -X DELETE /api/boards/{board}/lists/{list}/cards/{card} \
+  -H 'Authorization: API_KEY'
+
+
+
DELETE /api/boards/{board}/lists/{list}/cards/{card} HTTP/1.1
+
+
+
var headers = {
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/boards/{board}/lists/{list}/cards/{card}',
+  method: 'delete',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+
+const headers = {
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/boards/{board}/lists/{list}/cards/{card}',
+{
+  method: 'DELETE',
+
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.delete '/api/boards/{board}/lists/{list}/cards/{card}',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Authorization': 'API_KEY'
+}
+
+r = requests.delete('/api/boards/{board}/lists/{list}/cards/{card}', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/boards/{board}/lists/{list}/cards/{card}");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("DELETE");
+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{
+        "Authorization": []string{"API_KEY"},
+        
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("DELETE", "/api/boards/{board}/lists/{list}/cards/{card}", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

DELETE /api/boards/{board}/lists/{list}/cards/{card}

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board value
listpathstringtruethe list value
cardpathstringtruethe card value
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseNone
+ +

get_board_swimlane_cards

+

+
+

Code samples

+
+
# You can also use wget
+curl -X GET /api/boards/{board}/swimlanes/{swimlane}/cards \
+  -H 'Authorization: API_KEY'
+
+
+
GET /api/boards/{board}/swimlanes/{swimlane}/cards HTTP/1.1
+
+
+
var headers = {
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/boards/{board}/swimlanes/{swimlane}/cards',
+  method: 'get',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+
+const headers = {
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/boards/{board}/swimlanes/{swimlane}/cards',
+{
+  method: 'GET',
+
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.get '/api/boards/{board}/swimlanes/{swimlane}/cards',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Authorization': 'API_KEY'
+}
+
+r = requests.get('/api/boards/{board}/swimlanes/{swimlane}/cards', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/boards/{board}/swimlanes/{swimlane}/cards");
+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{
+        "Authorization": []string{"API_KEY"},
+        
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("GET", "/api/boards/{board}/swimlanes/{swimlane}/cards", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

GET /api/boards/{board}/swimlanes/{swimlane}/cards

+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board value
swimlanepathstringtruethe swimlane value
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseNone
+ +

Users

+

add_board_member

+

+
+

Code samples

+
+
# You can also use wget
+curl -X POST /api/boards/{board}/members/{user}/add \
+  -H 'Content-Type: multipart/form-data' \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
POST /api/boards/{board}/members/{user}/add HTTP/1.1
+
+Content-Type: multipart/form-data
+Accept: application/json
+
+
+
var headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/boards/{board}/members/{user}/add',
+  method: 'post',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+const inputBody = '{
+  "action": "string",
+  "isAdmin": true,
+  "isNoComments": true,
+  "isCommentOnly": true
+}';
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/boards/{board}/members/{user}/add',
+{
+  method: 'POST',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Content-Type' => 'multipart/form-data',
+  'Accept' => 'application/json',
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.post '/api/boards/{board}/members/{user}/add',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Content-Type': 'multipart/form-data',
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.post('/api/boards/{board}/members/{user}/add', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/boards/{board}/members/{user}/add");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("POST");
+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{
+        "Content-Type": []string{"multipart/form-data"},
+        "Accept": []string{"application/json"},
+        "Authorization": []string{"API_KEY"},
+        
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("POST", "/api/boards/{board}/members/{user}/add", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

POST /api/boards/{board}/members/{user}/add

+

Add New Board Member with Role

+

Only the admin user (the first user) can call the REST API.

+

Note: see Boards.set_board_member_permission +to later change the permissions.

+
+

Body parameter

+
+
action: string
+isAdmin: true
+isNoComments: true
+isCommentOnly: true
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board ID
userpathstringtruethe user ID
bodybodyobjectfalsenone
» actionbodystringtruethe action value
» isAdminbodybooleantrueis the user an admin of the board
» isNoCommentsbodybooleantruedisable comments
» isCommentOnlybodybooleantrueonly enable comments
+

Detailed descriptions

+

board: the board ID

+

user: the user ID

+
+

Example responses

+
+
+

200 Response

+
+
{
+  "_id": "string",
+  "title": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
» titlestringfalsenonenone
+ +

post_board_user_remove

+

+
+

Code samples

+
+
# You can also use wget
+curl -X POST /api/boards/{board}/members/{user}/remove \
+  -H 'Content-Type: multipart/form-data' \
+  -H 'Authorization: API_KEY'
+
+
+
POST /api/boards/{board}/members/{user}/remove HTTP/1.1
+
+Content-Type: multipart/form-data
+
+
+
var headers = {
+  'Content-Type':'multipart/form-data',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/boards/{board}/members/{user}/remove',
+  method: 'post',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+const inputBody = '{
+  "action": "string"
+}';
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/boards/{board}/members/{user}/remove',
+{
+  method: 'POST',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Content-Type' => 'multipart/form-data',
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.post '/api/boards/{board}/members/{user}/remove',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Content-Type': 'multipart/form-data',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.post('/api/boards/{board}/members/{user}/remove', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/boards/{board}/members/{user}/remove");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("POST");
+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{
+        "Content-Type": []string{"multipart/form-data"},
+        "Authorization": []string{"API_KEY"},
+        
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("POST", "/api/boards/{board}/members/{user}/remove", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

POST /api/boards/{board}/members/{user}/remove

+
+

Body parameter

+
+
action: string
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
boardpathstringtruethe board value
userpathstringtruethe user value
bodybodyobjectfalsenone
» actionbodystringtruethe action value
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseNone
+ +

get_current_user

+

+
+

Code samples

+
+
# You can also use wget
+curl -X GET /api/user \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
GET /api/user HTTP/1.1
+
+Accept: application/json
+
+
+
var headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/user',
+  method: 'get',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+
+const headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/user',
+{
+  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/user',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.get('/api/user', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/user");
+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/user", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

GET /api/user

+

returns the current user

+
+

Example responses

+
+
+

200 Response

+
+
{
+  "username": "string",
+  "emails": [
+    {
+      "address": "string",
+      "verified": true
+    }
+  ],
+  "createdAt": "string",
+  "modifiedAt": "string",
+  "profile": {
+    "avatarUrl": "string",
+    "emailBuffer": [
+      "string"
+    ],
+    "fullname": "string",
+    "showDesktopDragHandles": true,
+    "hiddenSystemMessages": true,
+    "hiddenMinicardLabelText": true,
+    "initials": "string",
+    "invitedBoards": [
+      "string"
+    ],
+    "language": "string",
+    "notifications": [],
+    "activity": "string",
+    "read": "string",
+    "showCardsCountAt": 0,
+    "startDayOfWeek": 0,
+    "starredBoards": [
+      "string"
+    ],
+    "icode": "string",
+    "boardView": "board-view-lists",
+    "listSortBy": "-modifiedat",
+    "templatesBoardId": "string",
+    "cardTemplatesSwimlaneId": "string",
+    "listTemplatesSwimlaneId": "string",
+    "boardTemplatesSwimlaneId": "string"
+  },
+  "services": {},
+  "heartbeat": "string",
+  "isAdmin": true,
+  "createdThroughApi": true,
+  "loginDisabled": true,
+  "authenticationMethod": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseUsers
+ +

get_all_users

+

+
+

Code samples

+
+
# You can also use wget
+curl -X GET /api/users \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
GET /api/users HTTP/1.1
+
+Accept: application/json
+
+
+
var headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/users',
+  method: 'get',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+
+const headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/users',
+{
+  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/users',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.get('/api/users', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/users");
+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/users", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

GET /api/users

+

return all the users

+

Only the admin user (the first user) can call the REST API.

+
+

Example responses

+
+
+

200 Response

+
+
[
+  {
+    "_id": "string",
+    "username": "string"
+  }
+]
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
» usernamestringfalsenonenone
+ +

new_user

+

+
+

Code samples

+
+
# You can also use wget
+curl -X POST /api/users \
+  -H 'Content-Type: multipart/form-data' \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
POST /api/users HTTP/1.1
+
+Content-Type: multipart/form-data
+Accept: application/json
+
+
+
var headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/users',
+  method: 'post',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+const inputBody = '{
+  "username": "string",
+  "email": "string",
+  "password": "string"
+}';
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/users',
+{
+  method: 'POST',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Content-Type' => 'multipart/form-data',
+  'Accept' => 'application/json',
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.post '/api/users',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Content-Type': 'multipart/form-data',
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.post('/api/users', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/users");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("POST");
+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{
+        "Content-Type": []string{"multipart/form-data"},
+        "Accept": []string{"application/json"},
+        "Authorization": []string{"API_KEY"},
+        
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("POST", "/api/users", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

POST /api/users

+

Create a new user

+

Only the admin user (the first user) can call the REST API.

+
+

Body parameter

+
+
username: string
+email: string
+password: string
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
bodybodyobjectfalsenone
» usernamebodystringtruethe new username
» emailbodystringtruethe email of the new user
» passwordbodystringtruethe password of the new user
+
+

Example responses

+
+
+

200 Response

+
+
{
+  "_id": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
+ +

get_user

+

+
+

Code samples

+
+
# You can also use wget
+curl -X GET /api/users/{user} \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
GET /api/users/{user} HTTP/1.1
+
+Accept: application/json
+
+
+
var headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/users/{user}',
+  method: 'get',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+
+const headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/users/{user}',
+{
+  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/users/{user}',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.get('/api/users/{user}', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/users/{user}");
+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/users/{user}", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

GET /api/users/{user}

+

get a given user

+

Only the admin user (the first user) can call the REST API.

+

Parameters

+ + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
userpathstringtruethe user ID
+

Detailed descriptions

+

user: the user ID

+
+

Example responses

+
+
+

200 Response

+
+
{
+  "username": "string",
+  "emails": [
+    {
+      "address": "string",
+      "verified": true
+    }
+  ],
+  "createdAt": "string",
+  "modifiedAt": "string",
+  "profile": {
+    "avatarUrl": "string",
+    "emailBuffer": [
+      "string"
+    ],
+    "fullname": "string",
+    "showDesktopDragHandles": true,
+    "hiddenSystemMessages": true,
+    "hiddenMinicardLabelText": true,
+    "initials": "string",
+    "invitedBoards": [
+      "string"
+    ],
+    "language": "string",
+    "notifications": [],
+    "activity": "string",
+    "read": "string",
+    "showCardsCountAt": 0,
+    "startDayOfWeek": 0,
+    "starredBoards": [
+      "string"
+    ],
+    "icode": "string",
+    "boardView": "board-view-lists",
+    "listSortBy": "-modifiedat",
+    "templatesBoardId": "string",
+    "cardTemplatesSwimlaneId": "string",
+    "listTemplatesSwimlaneId": "string",
+    "boardTemplatesSwimlaneId": "string"
+  },
+  "services": {},
+  "heartbeat": "string",
+  "isAdmin": true,
+  "createdThroughApi": true,
+  "loginDisabled": true,
+  "authenticationMethod": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseUsers
+ +

edit_user

+

+
+

Code samples

+
+
# You can also use wget
+curl -X PUT /api/users/{user} \
+  -H 'Content-Type: multipart/form-data' \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
PUT /api/users/{user} HTTP/1.1
+
+Content-Type: multipart/form-data
+Accept: application/json
+
+
+
var headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/users/{user}',
+  method: 'put',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+const inputBody = '{
+  "action": "string"
+}';
+const headers = {
+  'Content-Type':'multipart/form-data',
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/users/{user}',
+{
+  method: 'PUT',
+  body: inputBody,
+  headers: headers
+})
+.then(function(res) {
+    return res.json();
+}).then(function(body) {
+    console.log(body);
+});
+
+
+
require 'rest-client'
+require 'json'
+
+headers = {
+  'Content-Type' => 'multipart/form-data',
+  'Accept' => 'application/json',
+  'Authorization' => 'API_KEY'
+}
+
+result = RestClient.put '/api/users/{user}',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Content-Type': 'multipart/form-data',
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.put('/api/users/{user}', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/users/{user}");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("PUT");
+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{
+        "Content-Type": []string{"multipart/form-data"},
+        "Accept": []string{"application/json"},
+        "Authorization": []string{"API_KEY"},
+        
+    }
+
+    data := bytes.NewBuffer([]byte{jsonReq})
+    req, err := http.NewRequest("PUT", "/api/users/{user}", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

PUT /api/users/{user}

+

edit a given user

+

Only the admin user (the first user) can call the REST API.

+

Possible values for action:

+ +
+

Body parameter

+
+
action: string
+
+
+

Parameters

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
userpathstringtruethe user ID
bodybodyobjectfalsenone
» actionbodystringtruethe action
+

Detailed descriptions

+

user: the user ID

+
+

Example responses

+
+
+

200 Response

+
+
{
+  "_id": "string",
+  "title": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
» titlestringfalsenonenone
+ +

delete_user

+

+
+

Code samples

+
+
# You can also use wget
+curl -X DELETE /api/users/{user} \
+  -H 'Accept: application/json' \
+  -H 'Authorization: API_KEY'
+
+
+
DELETE /api/users/{user} HTTP/1.1
+
+Accept: application/json
+
+
+
var headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+$.ajax({
+  url: '/api/users/{user}',
+  method: 'delete',
+
+  headers: headers,
+  success: function(data) {
+    console.log(JSON.stringify(data));
+  }
+})
+
+
+
const fetch = require('node-fetch');
+
+const headers = {
+  'Accept':'application/json',
+  'Authorization':'API_KEY'
+
+};
+
+fetch('/api/users/{user}',
+{
+  method: 'DELETE',
+
+  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.delete '/api/users/{user}',
+  params: {
+  }, headers: headers
+
+p JSON.parse(result)
+
+
+
import requests
+headers = {
+  'Accept': 'application/json',
+  'Authorization': 'API_KEY'
+}
+
+r = requests.delete('/api/users/{user}', params={
+
+}, headers = headers)
+
+print r.json()
+
+
+
URL obj = new URL("/api/users/{user}");
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+con.setRequestMethod("DELETE");
+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("DELETE", "/api/users/{user}", data)
+    req.Header = headers
+
+    client := &http.Client{}
+    resp, err := client.Do(req)
+    // ...
+}
+
+
+

DELETE /api/users/{user}

+

Delete a user

+

Only the admin user (the first user) can call the REST API.

+

Parameters

+ + + + + + + + + + + + + + + + + + + +
NameInTypeRequiredDescription
userpathstringtruethe ID of the user to delete
+

Detailed descriptions

+

user: the ID of the user to delete

+
+

Example responses

+
+
+

200 Response

+
+
{
+  "_id": "string"
+}
+
+

Responses

+ + + + + + + + + + + + + + + + + +
StatusMeaningDescriptionSchema
200OK200 responseInline
+

Response Schema

+

Status Code 200

+ + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
» _idstringfalsenonenone
+

Swimlanes

get_all_swimlanes

@@ -9645,7 +12933,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -9866,7 +13154,7 @@ System.out.println(response.toString()); "Content-Type": []string{"multipart/form-data"}, "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -10088,7 +13376,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Accept": []string{"application/json"}, "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -10276,7 +13564,7 @@ System.out.println(response.toString()); headers := map[string][]string{ "Authorization": []string{"API_KEY"}, - + } data := bytes.NewBuffer([]byte{jsonReq}) @@ -11065,6 +14353,466 @@ UserSecurity +

Cards

+

+
{
+  "title": "string",
+  "archived": true,
+  "parentId": "string",
+  "listId": "string",
+  "swimlaneId": "string",
+  "boardId": "string",
+  "coverId": "string",
+  "color": "white",
+  "createdAt": "string",
+  "modifiedAt": "string",
+  "customFields": [
+    {}
+  ],
+  "dateLastActivity": "string",
+  "description": "string",
+  "requestedBy": "string",
+  "assignedBy": "string",
+  "labelIds": [
+    "string"
+  ],
+  "members": [
+    "string"
+  ],
+  "assignees": [
+    "string"
+  ],
+  "receivedAt": "string",
+  "startAt": "string",
+  "dueAt": "string",
+  "endAt": "string",
+  "spentTime": 0,
+  "isOvertime": true,
+  "userId": "string",
+  "sort": 0,
+  "subtaskSort": 0,
+  "type": "string",
+  "linkedId": "string",
+  "vote": {
+    "question": "string",
+    "positive": [
+      "string"
+    ],
+    "negative": [
+      "string"
+    ],
+    "end": "string",
+    "public": true
+  }
+}
+
+
+

Properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
titlestring|nullfalsenonethe title of the card
archivedbooleantruenoneis the card archived
parentIdstring|nullfalsenoneID of the parent card
listIdstring|nullfalsenoneList ID where the card is
swimlaneIdstringtruenoneSwimlane ID where the card is
boardIdstring|nullfalsenoneBoard ID of the card
coverIdstring|nullfalsenoneCover ID of the card
colorstring|nullfalsenonenone
createdAtstringtruenonecreation date
modifiedAtstringtruenonenone
customFields[CardsCustomfields]|nullfalsenonelist of custom fields
dateLastActivitystringtruenoneDate of last activity
descriptionstring|nullfalsenonedescription of the card
requestedBystring|nullfalsenonewho requested the card (ID of the user)
assignedBystring|nullfalsenonewho assigned the card (ID of the user)
labelIds[string]|nullfalsenonelist of labels ID the card has
members[string]|nullfalsenonelist of members (user IDs)
assignees[string]|nullfalsenonewho is assignee of the card (user ID), maximum one ID of assignee in array.
receivedAtstring|nullfalsenoneDate the card was received
startAtstring|nullfalsenoneDate the card was started to be worked on
dueAtstring|nullfalsenoneDate the card is due
endAtstring|nullfalsenoneDate the card ended
spentTimenumber|nullfalsenoneHow much time has been spent on this
isOvertimeboolean|nullfalsenoneis the card over time?
userIdstringtruenoneuser ID of the author of the card
sortnumbertruenoneSort value
subtaskSortnumber|nullfalsenonesubtask sort value
typestringtruenonetype of the card
linkedIdstring|nullfalsenoneID of the linked card
voteCardsVotefalsenonevote object, see below
+

Enumerated Values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyValue
colorwhite
colorgreen
coloryellow
colororange
colorred
colorpurple
colorblue
colorsky
colorlime
colorpink
colorblack
colorsilver
colorpeachpuff
colorcrimson
colorplum
colordarkgreen
colorslateblue
colormagenta
colorgold
colornavy
colorgray
colorsaddlebrown
colorpaleturquoise
colormistyrose
colorindigo
+

CardsVote

+

+
{
+  "question": "string",
+  "positive": [
+    "string"
+  ],
+  "negative": [
+    "string"
+  ],
+  "end": "string",
+  "public": true
+}
+
+
+

Properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
questionstringtruenonenone
positive[string]falsenonelist of members (user IDs)
negative[string]falsenonelist of members (user IDs)
endstringfalsenonenone
publicbooleantruenonenone
+

CardsCustomfields

+

+
{}
+
+
+

Properties

+

None

ChecklistItems

{
@@ -11948,47 +15696,475 @@ UserSecurity
 indigo
 
 
+
+

Users

+

+
{
+  "username": "string",
+  "emails": [
+    {
+      "address": "string",
+      "verified": true
+    }
+  ],
+  "createdAt": "string",
+  "modifiedAt": "string",
+  "profile": {
+    "avatarUrl": "string",
+    "emailBuffer": [
+      "string"
+    ],
+    "fullname": "string",
+    "showDesktopDragHandles": true,
+    "hiddenSystemMessages": true,
+    "hiddenMinicardLabelText": true,
+    "initials": "string",
+    "invitedBoards": [
+      "string"
+    ],
+    "language": "string",
+    "notifications": [],
+    "activity": "string",
+    "read": "string",
+    "showCardsCountAt": 0,
+    "startDayOfWeek": 0,
+    "starredBoards": [
+      "string"
+    ],
+    "icode": "string",
+    "boardView": "board-view-lists",
+    "listSortBy": "-modifiedat",
+    "templatesBoardId": "string",
+    "cardTemplatesSwimlaneId": "string",
+    "listTemplatesSwimlaneId": "string",
+    "boardTemplatesSwimlaneId": "string"
+  },
+  "services": {},
+  "heartbeat": "string",
+  "isAdmin": true,
+  "createdThroughApi": true,
+  "loginDisabled": true,
+  "authenticationMethod": "string"
+}
+
+
+

A User in wekan

+

Properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
usernamestring|nullfalsenonethe username of the user
emails[UsersEmails]|nullfalsenonethe list of emails attached to a user
createdAtstringtruenonecreation date of the user
modifiedAtstringtruenonenone
profileUsersProfilefalsenoneprofile settings
servicesobject|nullfalsenoneservices field of the user
heartbeatstring|nullfalsenonelast time the user has been seen
isAdminboolean|nullfalsenoneis the user an admin of the board?
createdThroughApiboolean|nullfalsenonewas the user created through the API?
loginDisabledboolean|nullfalsenoneloginDisabled field of the user
authenticationMethodstringtruenoneauthentication method of the user
+

UsersEmails

+

+
{
+  "address": "string",
+  "verified": true
+}
+
+
+

Properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
addressstringtruenoneThe email address
verifiedbooleantruenoneHas the email been verified
+

UsersProfile

+

+
{
+  "avatarUrl": "string",
+  "emailBuffer": [
+    "string"
+  ],
+  "fullname": "string",
+  "showDesktopDragHandles": true,
+  "hiddenSystemMessages": true,
+  "hiddenMinicardLabelText": true,
+  "initials": "string",
+  "invitedBoards": [
+    "string"
+  ],
+  "language": "string",
+  "notifications": [],
+  "activity": "string",
+  "read": "string",
+  "showCardsCountAt": 0,
+  "startDayOfWeek": 0,
+  "starredBoards": [
+    "string"
+  ],
+  "icode": "string",
+  "boardView": "board-view-lists",
+  "listSortBy": "-modifiedat",
+  "templatesBoardId": "string",
+  "cardTemplatesSwimlaneId": "string",
+  "listTemplatesSwimlaneId": "string",
+  "boardTemplatesSwimlaneId": "string"
+}
+
+
+

Properties

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeRequiredRestrictionsDescription
avatarUrlstringfalsenoneURL of the avatar of the user
emailBuffer[string]falsenonelist of email buffers of the user
fullnamestringfalsenonefull name of the user
showDesktopDragHandlesbooleanfalsenonedoes the user want to hide system messages?
hiddenSystemMessagesbooleanfalsenonedoes the user want to hide system messages?
hiddenMinicardLabelTextbooleanfalsenonedoes the user want to hide minicard label texts?
initialsstringfalsenoneinitials of the user
invitedBoards[string]falsenoneboard IDs the user has been invited to
languagestringfalsenonelanguage of the user
notifications[UsersProfileNotifications]falsenoneenabled notifications for the user
activitystringtruenoneThe id of the activity this notification references
readstringfalsenonethe date on which this notification was read
showCardsCountAtnumberfalsenoneshowCardCountAt field of the user
startDayOfWeeknumberfalsenonestartDayOfWeek field of the user
starredBoards[string]falsenonelist of starred board IDs
icodestringfalsenoneicode
boardViewstringfalsenoneboardView field of the user
listSortBystringfalsenonedefault sort list for user
templatesBoardIdstringtruenoneReference to the templates board
cardTemplatesSwimlaneIdstringtruenoneReference to the card templates swimlane Id
listTemplatesSwimlaneIdstringtruenoneReference to the list templates swimlane Id
boardTemplatesSwimlaneIdstringtruenoneReference to the board templates swimlane Id
+

Enumerated Values

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyValue
boardViewboard-view-lists
boardViewboard-view-swimlanes
boardViewboard-view-cal
listSortBy-modifiedat
listSortBymodifiedat
listSortBy-title
listSortBytitle
listSortBy-sort
listSortBysort
- +
- - + + Shell - - - + + + HTTP - - - + + + JavaScript - - - + + + Node.js - - - + + + Ruby - - - + + + Python - - - + + + Java - - - + + + Go - - + +
- +
diff --git a/public/api/wekan.yml b/public/api/wekan.yml index e17e19632..b9652c799 100644 --- a/public/api/wekan.yml +++ b/public/api/wekan.yml @@ -1221,6 +1221,296 @@ paths: properties: _id: type: string + /api/boards/{board}/lists/{list}/cards: + get: + operationId: get_all_cards + summary: Get all Cards attached 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: array + items: + type: object + properties: + _id: + type: string + title: + type: string + description: + type: string + post: + operationId: new_card + summary: Create a new Card + tags: + - Cards + consumes: + - multipart/form-data + - application/json + parameters: + - name: authorId + in: formData + description: the authorId value + type: string + required: true + - name: members + in: formData + description: | + the member IDs list of the new card + type: string + required: false + - name: assignees + in: formData + description: | + the array of maximum one ID of assignee of the new card + type: string + required: false + - name: title + in: formData + description: | + the title of the new card + type: string + required: true + - name: description + in: formData + description: | + the description of the new card + type: string + required: true + - name: swimlaneId + in: formData + description: | + the swimlane ID of the new card + type: string + required: true + - name: board + in: path + description: | + the board ID of the new card + type: string + required: true + - name: list + in: path + description: | + the list ID of the new card + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + type: object + properties: + _id: + type: string + /api/boards/{board}/lists/{list}/cards/{card}: + get: + operationId: get_board_list_card + tags: + - Cards + parameters: + - name: board + in: path + description: the board value + type: string + required: true + - name: list + in: path + description: the list value + type: string + required: true + - name: card + in: path + description: the card value + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + put: + operationId: put_board_list_card + tags: + - Cards + consumes: + - multipart/form-data + - application/json + parameters: + - name: title + in: formData + description: the title value + type: string + required: true + - name: listId + in: formData + description: the listId value + type: string + required: true + - name: authorId + in: formData + description: the authorId value + type: string + required: true + - name: parentId + in: formData + description: the parentId value + type: string + required: true + - name: description + in: formData + description: the description value + type: string + required: true + - name: color + in: formData + description: the color value + type: string + required: true + - name: labelIds + in: formData + description: the labelIds value + type: string + required: true + - name: requestedBy + in: formData + description: the requestedBy value + type: string + required: true + - name: assignedBy + in: formData + description: the assignedBy value + type: string + required: true + - name: receivedAt + in: formData + description: the receivedAt value + type: string + required: true + - name: startAt + in: formData + description: the startAt value + type: string + required: true + - name: dueAt + in: formData + description: the dueAt value + type: string + required: true + - name: endAt + in: formData + description: the endAt value + type: string + required: true + - name: spentTime + in: formData + description: the spentTime value + type: string + required: true + - name: isOverTime + in: formData + description: the isOverTime value + type: string + required: true + - name: customFields + in: formData + description: the customFields value + type: string + required: true + - name: members + in: formData + description: the members value + type: string + required: true + - name: assignees + in: formData + description: the assignees value + type: string + required: true + - name: swimlaneId + in: formData + description: the swimlaneId value + type: string + required: true + - name: board + in: path + description: the board value + type: string + required: true + - name: list + in: path + description: the list value + type: string + required: true + - name: card + in: path + description: the card value + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + delete: + operationId: delete_board_list_card + tags: + - Cards + parameters: + - name: board + in: path + description: the board value + type: string + required: true + - name: list + in: path + description: the list value + type: string + required: true + - name: card + in: path + description: the card value + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response /api/boards/{board}/members/{member}: post: operationId: set_board_member_permission @@ -1276,6 +1566,104 @@ paths: '200': description: |- 200 response + /api/boards/{board}/members/{user}/add: + post: + operationId: add_board_member + summary: Add New Board Member with Role + description: | + Only the admin user (the first user) can call the REST API. + + **Note**: see [Boards.set_board_member_permission](#set_board_member_permission) + to later change the permissions. + tags: + - Users + - Boards + consumes: + - multipart/form-data + - application/json + parameters: + - name: action + in: formData + description: the action value + type: string + required: true + - name: isAdmin + in: formData + description: | + is the user an admin of the board + type: boolean + required: true + - name: isNoComments + in: formData + description: | + disable comments + type: boolean + required: true + - name: isCommentOnly + in: formData + description: | + only enable comments + type: boolean + required: true + - name: board + in: path + description: | + the board ID + type: string + required: true + - name: user + in: path + description: | + the user ID + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + type: object + properties: + _id: + type: string + title: + type: string + /api/boards/{board}/members/{user}/remove: + post: + operationId: post_board_user_remove + tags: + - Users + consumes: + - multipart/form-data + - application/json + parameters: + - name: action + in: formData + description: the action value + type: string + required: true + - name: board + in: path + description: the board value + type: string + required: true + - name: user + in: path + description: the user value + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response /api/boards/{board}/swimlanes: get: operationId: get_all_swimlanes @@ -1392,6 +1780,208 @@ paths: '200': description: |- 200 response + /api/boards/{board}/swimlanes/{swimlane}/cards: + get: + operationId: get_board_swimlane_cards + tags: + - Cards + parameters: + - name: board + in: path + description: the board value + type: string + required: true + - name: swimlane + in: path + description: the swimlane value + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + /api/user: + get: + operationId: get_current_user + summary: returns the current user + tags: + - Users + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + $ref: "#/definitions/Users" + /api/users: + get: + operationId: get_all_users + summary: return all the users + description: | + Only the admin user (the first user) can call the REST API. + tags: + - Users + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + type: array + items: + type: object + properties: + _id: + type: string + username: + type: string + post: + operationId: new_user + summary: Create a new user + description: | + Only the admin user (the first user) can call the REST API. + tags: + - Users + consumes: + - multipart/form-data + - application/json + parameters: + - name: username + in: formData + description: | + the new username + type: string + required: true + - name: email + in: formData + description: | + the email of the new user + type: string + required: true + - name: password + in: formData + description: | + the password of the new user + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + type: object + properties: + _id: + type: string + /api/users/{user}: + get: + operationId: get_user + summary: get a given user + description: | + Only the admin user (the first user) can call the REST API. + tags: + - Users + parameters: + - name: user + in: path + description: | + the user ID + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + $ref: "#/definitions/Users" + put: + operationId: edit_user + summary: edit a given user + description: | + Only the admin user (the first user) can call the REST API. + + Possible values for *action*: + - `takeOwnership`: The admin takes the ownership of ALL boards of the user (archived and not archived) where the user is admin on. + - `disableLogin`: Disable a user (the user is not allowed to login and his login tokens are purged) + - `enableLogin`: Enable a user + tags: + - Users + consumes: + - multipart/form-data + - application/json + parameters: + - name: action + in: formData + description: | + the action + type: string + required: true + - name: user + in: path + description: | + the user ID + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + type: object + properties: + _id: + type: string + title: + type: string + delete: + operationId: delete_user + summary: Delete a user + description: | + Only the admin user (the first user) can call the REST API. + tags: + - Users + parameters: + - name: user + in: path + description: | + the ID of the user to delete + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + type: object + properties: + _id: + type: string /api/users/{user}/boards: get: operationId: get_boards_from_user @@ -1764,6 +2354,222 @@ definitions: - createdAt - modifiedAt - userId + Cards: + type: object + properties: + title: + description: | + the title of the card + type: string + x-nullable: true + archived: + description: | + is the card archived + type: boolean + parentId: + description: | + ID of the parent card + type: string + x-nullable: true + listId: + description: | + List ID where the card is + type: string + x-nullable: true + swimlaneId: + description: | + Swimlane ID where the card is + type: string + boardId: + description: | + Board ID of the card + type: string + x-nullable: true + coverId: + description: | + Cover ID of the card + type: string + x-nullable: true + color: + type: string + enum: + - white + - green + - yellow + - orange + - red + - purple + - blue + - sky + - lime + - pink + - black + - silver + - peachpuff + - crimson + - plum + - darkgreen + - slateblue + - magenta + - gold + - navy + - gray + - saddlebrown + - paleturquoise + - mistyrose + - indigo + x-nullable: true + createdAt: + description: | + creation date + type: string + modifiedAt: + type: string + customFields: + description: | + list of custom fields + type: array + items: + $ref: "#/definitions/CardsCustomfields" + x-nullable: true + dateLastActivity: + description: | + Date of last activity + type: string + description: + description: | + description of the card + type: string + x-nullable: true + requestedBy: + description: | + who requested the card (ID of the user) + type: string + x-nullable: true + assignedBy: + description: | + who assigned the card (ID of the user) + type: string + x-nullable: true + labelIds: + description: | + list of labels ID the card has + type: array + items: + type: string + x-nullable: true + x-nullable: true + members: + description: | + list of members (user IDs) + type: array + items: + type: string + x-nullable: true + x-nullable: true + assignees: + description: | + who is assignee of the card (user ID), + maximum one ID of assignee in array. + type: array + items: + type: string + x-nullable: true + x-nullable: true + receivedAt: + description: | + Date the card was received + type: string + x-nullable: true + startAt: + description: | + Date the card was started to be worked on + type: string + x-nullable: true + dueAt: + description: | + Date the card is due + type: string + x-nullable: true + endAt: + description: | + Date the card ended + type: string + x-nullable: true + spentTime: + description: | + How much time has been spent on this + type: number + x-nullable: true + isOvertime: + description: | + is the card over time? + type: boolean + x-nullable: true + userId: + description: | + user ID of the author of the card + type: string + sort: + description: | + Sort value + type: number + subtaskSort: + description: | + subtask sort value + type: number + x-nullable: true + type: + description: | + type of the card + type: string + linkedId: + description: | + ID of the linked card + type: string + x-nullable: true + vote: + description: | + vote object, see below + $ref: "#/definitions/CardsVote" + x-nullable: true + required: + - archived + - swimlaneId + - createdAt + - modifiedAt + - dateLastActivity + - userId + - sort + - type + CardsVote: + type: object + properties: + question: + type: string + positive: + description: | + list of members (user IDs) + type: array + items: + type: string + x-nullable: true + negative: + description: | + list of members (user IDs) + type: array + items: + type: string + x-nullable: true + end: + type: string + public: + type: boolean + required: + - question + - public + CardsCustomfields: + type: object ChecklistItems: type: object description: An item in a checklist @@ -2131,3 +2937,196 @@ definitions: - createdAt - modifiedAt - type + Users: + type: object + description: A User in wekan + properties: + username: + description: | + the username of the user + type: string + x-nullable: true + emails: + description: | + the list of emails attached to a user + type: array + items: + $ref: "#/definitions/UsersEmails" + x-nullable: true + createdAt: + description: | + creation date of the user + type: string + modifiedAt: + type: string + profile: + description: | + profile settings + $ref: "#/definitions/UsersProfile" + x-nullable: true + services: + description: | + services field of the user + type: object + x-nullable: true + heartbeat: + description: | + last time the user has been seen + type: string + x-nullable: true + isAdmin: + description: | + is the user an admin of the board? + type: boolean + x-nullable: true + createdThroughApi: + description: | + was the user created through the API? + type: boolean + x-nullable: true + loginDisabled: + description: | + loginDisabled field of the user + type: boolean + x-nullable: true + authenticationMethod: + description: | + authentication method of the user + type: string + required: + - createdAt + - modifiedAt + - authenticationMethod + UsersEmails: + type: object + properties: + address: + description: | + The email address + type: string + verified: + description: | + Has the email been verified + type: boolean + required: + - address + - verified + UsersProfile: + type: object + properties: + avatarUrl: + description: | + URL of the avatar of the user + type: string + emailBuffer: + description: | + list of email buffers of the user + type: array + items: + type: string + x-nullable: true + fullname: + description: | + full name of the user + type: string + showDesktopDragHandles: + description: | + does the user want to hide system messages? + type: boolean + hiddenSystemMessages: + description: | + does the user want to hide system messages? + type: boolean + hiddenMinicardLabelText: + description: | + does the user want to hide minicard label texts? + type: boolean + initials: + description: | + initials of the user + type: string + invitedBoards: + description: | + board IDs the user has been invited to + type: array + items: + type: string + x-nullable: true + language: + description: | + language of the user + type: string + notifications: + description: | + enabled notifications for the user + type: array + items: + $ref: "#/definitions/UsersProfileNotifications" + activity: + description: | + The id of the activity this notification references + type: string + read: + description: | + the date on which this notification was read + type: string + showCardsCountAt: + description: | + showCardCountAt field of the user + type: number + startDayOfWeek: + description: | + startDayOfWeek field of the user + type: number + starredBoards: + description: | + list of starred board IDs + type: array + items: + type: string + x-nullable: true + icode: + description: | + icode + type: string + boardView: + description: | + boardView field of the user + type: string + enum: + - board-view-lists + - board-view-swimlanes + - board-view-cal + listSortBy: + description: | + default sort list for user + type: string + enum: + - -modifiedat + - modifiedat + - -title + - title + - -sort + - sort + templatesBoardId: + description: | + Reference to the templates board + type: string + cardTemplatesSwimlaneId: + description: | + Reference to the card templates swimlane Id + type: string + listTemplatesSwimlaneId: + description: | + Reference to the list templates swimlane Id + type: string + boardTemplatesSwimlaneId: + description: | + Reference to the board templates swimlane Id + type: string + required: + - activity + - templatesBoardId + - cardTemplatesSwimlaneId + - listTemplatesSwimlaneId + - boardTemplatesSwimlaneId