|
@@ -1524,7 +1524,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
|
|
|
<ul class="toc-list-h1">
|
|
|
|
|
|
<li>
|
|
|
- <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v4.56">Wekan REST API v4.56</a>
|
|
|
+ <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v4.57">Wekan REST API v4.57</a>
|
|
|
|
|
|
</li>
|
|
|
|
|
@@ -1582,6 +1582,11 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
|
|
|
|
|
|
</li>
|
|
|
|
|
|
+ <li>
|
|
|
+ <a href="#get_board_attachments" class="toc-h2 toc-link" data-title="get_board_attachments">get_board_attachments</a>
|
|
|
+
|
|
|
+ </li>
|
|
|
+
|
|
|
<li>
|
|
|
<a href="#exportjson" class="toc-h2 toc-link" data-title="exportJson">exportJson</a>
|
|
|
|
|
@@ -2027,7 +2032,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
|
|
|
<div class="page-wrapper">
|
|
|
<div class="dark-box"></div>
|
|
|
<div class="content">
|
|
|
- <h1 id="wekan-rest-api">Wekan REST API v4.56</h1>
|
|
|
+ <h1 id="wekan-rest-api">Wekan REST API v4.57</h1>
|
|
|
<blockquote>
|
|
|
<p>Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.</p>
|
|
|
</blockquote>
|
|
@@ -3510,6 +3515,250 @@ System.out.println(response.toString());
|
|
|
To perform this operation, you must be authenticated by means of one of the following methods:
|
|
|
UserSecurity
|
|
|
</aside>
|
|
|
+<h2 id="get_board_attachments">get_board_attachments</h2>
|
|
|
+<p><a id="opIdget_board_attachments"></a></p>
|
|
|
+<blockquote>
|
|
|
+<p>Code samples</p>
|
|
|
+</blockquote>
|
|
|
+<pre class="highlight tab tab-shell"><code><span class="hljs-comment"># You can also use wget</span>
|
|
|
+curl -X GET /api/boards/{board}/attachments \
|
|
|
+ -H <span class="hljs-string">'Accept: application/json'</span> \
|
|
|
+ -H <span class="hljs-string">'Authorization: API_KEY'</span>
|
|
|
+
|
|
|
+</code></pre>
|
|
|
+<pre class="highlight tab tab-http"><code><span class="hljs-keyword">GET</span> <span class="hljs-string">/api/boards/{board}/attachments</span> HTTP/1.1
|
|
|
+
|
|
|
+<span class="http"><span class="hljs-attribute">Accept</span>: application/json
|
|
|
+
|
|
|
+<span class="undefined"></span></span></code></pre>
|
|
|
+<pre class="highlight tab tab-javascript"><code><span class="hljs-keyword">var</span> headers = {
|
|
|
+ <span class="hljs-string">'Accept'</span>:<span class="hljs-string">'application/json'</span>,
|
|
|
+ <span class="hljs-string">'Authorization'</span>:<span class="hljs-string">'API_KEY'</span>
|
|
|
+
|
|
|
+};
|
|
|
+
|
|
|
+$.ajax({
|
|
|
+ <span class="hljs-attr">url</span>: <span class="hljs-string">'/api/boards/{board}/attachments'</span>,
|
|
|
+ <span class="hljs-attr">method</span>: <span class="hljs-string">'get'</span>,
|
|
|
+
|
|
|
+ <span class="hljs-attr">headers</span>: headers,
|
|
|
+ <span class="hljs-attr">success</span>: <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">data</span>) </span>{
|
|
|
+ <span class="hljs-built_in">console</span>.log(<span class="hljs-built_in">JSON</span>.stringify(data));
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+</code></pre>
|
|
|
+<pre class="highlight tab tab-javascript--nodejs"><code><span class="hljs-keyword">const</span> fetch = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node-fetch'</span>);
|
|
|
+
|
|
|
+<span class="hljs-keyword">const</span> headers = {
|
|
|
+ <span class="hljs-string">'Accept'</span>:<span class="hljs-string">'application/json'</span>,
|
|
|
+ <span class="hljs-string">'Authorization'</span>:<span class="hljs-string">'API_KEY'</span>
|
|
|
+
|
|
|
+};
|
|
|
+
|
|
|
+fetch(<span class="hljs-string">'/api/boards/{board}/attachments'</span>,
|
|
|
+{
|
|
|
+ <span class="hljs-attr">method</span>: <span class="hljs-string">'GET'</span>,
|
|
|
+
|
|
|
+ <span class="hljs-attr">headers</span>: headers
|
|
|
+})
|
|
|
+.then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) </span>{
|
|
|
+ <span class="hljs-keyword">return</span> res.json();
|
|
|
+}).then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">body</span>) </span>{
|
|
|
+ <span class="hljs-built_in">console</span>.log(body);
|
|
|
+});
|
|
|
+
|
|
|
+</code></pre>
|
|
|
+<pre class="highlight tab tab-ruby"><code><span class="hljs-keyword">require</span> <span class="hljs-string">'rest-client'</span>
|
|
|
+<span class="hljs-keyword">require</span> <span class="hljs-string">'json'</span>
|
|
|
+
|
|
|
+headers = {
|
|
|
+ <span class="hljs-string">'Accept'</span> => <span class="hljs-string">'application/json'</span>,
|
|
|
+ <span class="hljs-string">'Authorization'</span> => <span class="hljs-string">'API_KEY'</span>
|
|
|
+}
|
|
|
+
|
|
|
+result = RestClient.get <span class="hljs-string">'/api/boards/{board}/attachments'</span>,
|
|
|
+ <span class="hljs-symbol">params:</span> {
|
|
|
+ }, <span class="hljs-symbol">headers:</span> headers
|
|
|
+
|
|
|
+p JSON.parse(result)
|
|
|
+
|
|
|
+</code></pre>
|
|
|
+<pre class="highlight tab tab-python"><code><span class="hljs-keyword">import</span> requests
|
|
|
+headers = {
|
|
|
+ <span class="hljs-string">'Accept'</span>: <span class="hljs-string">'application/json'</span>,
|
|
|
+ <span class="hljs-string">'Authorization'</span>: <span class="hljs-string">'API_KEY'</span>
|
|
|
+}
|
|
|
+
|
|
|
+r = requests.get(<span class="hljs-string">'/api/boards/{board}/attachments'</span>, params={
|
|
|
+
|
|
|
+}, headers = headers)
|
|
|
+
|
|
|
+<span class="hljs-keyword">print</span> r.json()
|
|
|
+
|
|
|
+</code></pre>
|
|
|
+<pre class="highlight tab tab-java"><code>URL obj = <span class="hljs-keyword">new</span> URL(<span class="hljs-string">"/api/boards/{board}/attachments"</span>);
|
|
|
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
|
|
|
+con.setRequestMethod(<span class="hljs-string">"GET"</span>);
|
|
|
+<span class="hljs-keyword">int</span> responseCode = con.getResponseCode();
|
|
|
+BufferedReader in = <span class="hljs-keyword">new</span> BufferedReader(
|
|
|
+ <span class="hljs-keyword">new</span> InputStreamReader(con.getInputStream()));
|
|
|
+String inputLine;
|
|
|
+StringBuffer response = <span class="hljs-keyword">new</span> StringBuffer();
|
|
|
+<span class="hljs-keyword">while</span> ((inputLine = in.readLine()) != <span class="hljs-keyword">null</span>) {
|
|
|
+ response.append(inputLine);
|
|
|
+}
|
|
|
+in.close();
|
|
|
+System.out.println(response.toString());
|
|
|
+
|
|
|
+</code></pre>
|
|
|
+<pre class="highlight tab tab-go"><code><span class="hljs-keyword">package</span> main
|
|
|
+
|
|
|
+<span class="hljs-keyword">import</span> (
|
|
|
+ <span class="hljs-string">"bytes"</span>
|
|
|
+ <span class="hljs-string">"net/http"</span>
|
|
|
+)
|
|
|
+
|
|
|
+<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span> {
|
|
|
+
|
|
|
+ headers := <span class="hljs-keyword">map</span>[<span class="hljs-keyword">string</span>][]<span class="hljs-keyword">string</span>{
|
|
|
+ <span class="hljs-string">"Accept"</span>: []<span class="hljs-keyword">string</span>{<span class="hljs-string">"application/json"</span>},
|
|
|
+ <span class="hljs-string">"Authorization"</span>: []<span class="hljs-keyword">string</span>{<span class="hljs-string">"API_KEY"</span>},
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ data := bytes.NewBuffer([]<span class="hljs-keyword">byte</span>{jsonReq})
|
|
|
+ req, err := http.NewRequest(<span class="hljs-string">"GET"</span>, <span class="hljs-string">"/api/boards/{board}/attachments"</span>, data)
|
|
|
+ req.Header = headers
|
|
|
+
|
|
|
+ client := &http.Client{}
|
|
|
+ resp, err := client.Do(req)
|
|
|
+ <span class="hljs-comment">// ...</span>
|
|
|
+}
|
|
|
+
|
|
|
+</code></pre>
|
|
|
+<p><code>GET /api/boards/{board}/attachments</code></p>
|
|
|
+<p><em>Get the list of attachments of a board</em></p>
|
|
|
+<h3 id="get_board_attachments-parameters">Parameters</h3>
|
|
|
+<table>
|
|
|
+<thead>
|
|
|
+<tr>
|
|
|
+<th>Name</th>
|
|
|
+<th>In</th>
|
|
|
+<th>Type</th>
|
|
|
+<th>Required</th>
|
|
|
+<th>Description</th>
|
|
|
+</tr>
|
|
|
+</thead>
|
|
|
+<tbody>
|
|
|
+<tr>
|
|
|
+<td>board</td>
|
|
|
+<td>path</td>
|
|
|
+<td>string</td>
|
|
|
+<td>true</td>
|
|
|
+<td>the board ID</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+<h4 id="detailed-descriptions">Detailed descriptions</h4>
|
|
|
+<p><strong>board</strong>: the board ID</p>
|
|
|
+<blockquote>
|
|
|
+<p>Example responses</p>
|
|
|
+</blockquote>
|
|
|
+<blockquote>
|
|
|
+<p>200 Response</p>
|
|
|
+</blockquote>
|
|
|
+<pre class="highlight tab tab-json"><code>[
|
|
|
+ {
|
|
|
+ <span class="hljs-attr">"attachmentId"</span>: <span class="hljs-string">"string"</span>,
|
|
|
+ <span class="hljs-attr">"attachmentName"</span>: <span class="hljs-string">"string"</span>,
|
|
|
+ <span class="hljs-attr">"attachmentType"</span>: <span class="hljs-string">"string"</span>,
|
|
|
+ <span class="hljs-attr">"cardId"</span>: <span class="hljs-string">"string"</span>,
|
|
|
+ <span class="hljs-attr">"listId"</span>: <span class="hljs-string">"string"</span>,
|
|
|
+ <span class="hljs-attr">"swimlaneId"</span>: <span class="hljs-string">"string"</span>
|
|
|
+ }
|
|
|
+]
|
|
|
+</code></pre>
|
|
|
+<h3 id="get_board_attachments-responses">Responses</h3>
|
|
|
+<table>
|
|
|
+<thead>
|
|
|
+<tr>
|
|
|
+<th>Status</th>
|
|
|
+<th>Meaning</th>
|
|
|
+<th>Description</th>
|
|
|
+<th>Schema</th>
|
|
|
+</tr>
|
|
|
+</thead>
|
|
|
+<tbody>
|
|
|
+<tr>
|
|
|
+<td>200</td>
|
|
|
+<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td>
|
|
|
+<td>200 response</td>
|
|
|
+<td>Inline</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+<h3 id="get_board_attachments-responseschema">Response Schema</h3>
|
|
|
+<p>Status Code <strong>200</strong></p>
|
|
|
+<table>
|
|
|
+<thead>
|
|
|
+<tr>
|
|
|
+<th>Name</th>
|
|
|
+<th>Type</th>
|
|
|
+<th>Required</th>
|
|
|
+<th>Restrictions</th>
|
|
|
+<th>Description</th>
|
|
|
+</tr>
|
|
|
+</thead>
|
|
|
+<tbody>
|
|
|
+<tr>
|
|
|
+<td>» attachmentId</td>
|
|
|
+<td>string</td>
|
|
|
+<td>false</td>
|
|
|
+<td>none</td>
|
|
|
+<td>none</td>
|
|
|
+</tr>
|
|
|
+<tr>
|
|
|
+<td>» attachmentName</td>
|
|
|
+<td>string</td>
|
|
|
+<td>false</td>
|
|
|
+<td>none</td>
|
|
|
+<td>none</td>
|
|
|
+</tr>
|
|
|
+<tr>
|
|
|
+<td>» attachmentType</td>
|
|
|
+<td>string</td>
|
|
|
+<td>false</td>
|
|
|
+<td>none</td>
|
|
|
+<td>none</td>
|
|
|
+</tr>
|
|
|
+<tr>
|
|
|
+<td>» cardId</td>
|
|
|
+<td>string</td>
|
|
|
+<td>false</td>
|
|
|
+<td>none</td>
|
|
|
+<td>none</td>
|
|
|
+</tr>
|
|
|
+<tr>
|
|
|
+<td>» listId</td>
|
|
|
+<td>string</td>
|
|
|
+<td>false</td>
|
|
|
+<td>none</td>
|
|
|
+<td>none</td>
|
|
|
+</tr>
|
|
|
+<tr>
|
|
|
+<td>» swimlaneId</td>
|
|
|
+<td>string</td>
|
|
|
+<td>false</td>
|
|
|
+<td>none</td>
|
|
|
+<td>none</td>
|
|
|
+</tr>
|
|
|
+</tbody>
|
|
|
+</table>
|
|
|
+<aside class="warning">
|
|
|
+To perform this operation, you must be authenticated by means of one of the following methods:
|
|
|
+UserSecurity
|
|
|
+</aside>
|
|
|
<h2 id="exportjson">exportJson</h2>
|
|
|
<p><a id="opIdexportJson"></a></p>
|
|
|
<blockquote>
|