|
@@ -7,7 +7,7 @@
|
|
<meta charset="utf-8">
|
|
<meta charset="utf-8">
|
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
|
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
- <title>Wekan REST API v4.96</title>
|
|
|
|
|
|
+ <title>Wekan REST API v5.09</title>
|
|
|
|
|
|
<style>
|
|
<style>
|
|
</style>
|
|
</style>
|
|
@@ -1549,7 +1549,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
|
|
<ul class="toc-list-h1">
|
|
<ul class="toc-list-h1">
|
|
|
|
|
|
<li>
|
|
<li>
|
|
- <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v4.96">Wekan REST API v4.96</a>
|
|
|
|
|
|
+ <a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v5.09">Wekan REST API v5.09</a>
|
|
|
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
@@ -1797,6 +1797,21 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
|
|
|
|
|
|
</li>
|
|
</li>
|
|
|
|
|
|
|
|
+ <li>
|
|
|
|
+ <a href="#add_custom_field_dropdown_items" class="toc-h2 toc-link" data-title="">add_custom_field_dropdown_items</a>
|
|
|
|
+
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ <li>
|
|
|
|
+ <a href="#edit_custom_field_dropdown_item" class="toc-h2 toc-link" data-title="">edit_custom_field_dropdown_item</a>
|
|
|
|
+
|
|
|
|
+ </li>
|
|
|
|
+
|
|
|
|
+ <li>
|
|
|
|
+ <a href="#delete_custom_field_dropdown_item" class="toc-h2 toc-link" data-title="">delete_custom_field_dropdown_item</a>
|
|
|
|
+
|
|
|
|
+ </li>
|
|
|
|
+
|
|
</ul>
|
|
</ul>
|
|
|
|
|
|
</li>
|
|
</li>
|
|
@@ -2077,7 +2092,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
|
|
<div class="page-wrapper">
|
|
<div class="page-wrapper">
|
|
<div class="dark-box"></div>
|
|
<div class="dark-box"></div>
|
|
<div class="content">
|
|
<div class="content">
|
|
- <h1 id="wekan-rest-api">Wekan REST API v4.96</h1>
|
|
|
|
|
|
+ <h1 id="wekan-rest-api">Wekan REST API v5.09</h1>
|
|
<blockquote>
|
|
<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>
|
|
<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>
|
|
</blockquote>
|
|
@@ -9072,6 +9087,7 @@ Accept: application/json
|
|
</span></code></pre>
|
|
</span></code></pre>
|
|
<pre class="highlight tab tab-javascript"><code><span class="hljs-keyword">const</span> inputBody = <span class="hljs-string">'{
|
|
<pre class="highlight tab tab-javascript"><code><span class="hljs-keyword">const</span> inputBody = <span class="hljs-string">'{
|
|
"title": "string",
|
|
"title": "string",
|
|
|
|
+ "sort": "string",
|
|
"parentId": "string",
|
|
"parentId": "string",
|
|
"description": "string",
|
|
"description": "string",
|
|
"color": "string",
|
|
"color": "string",
|
|
@@ -9114,6 +9130,7 @@ fetch(<span class="hljs-string">'/api/boards/{board}/lists/{list}/cards/{ca
|
|
<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>);
|
|
<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> inputBody = {
|
|
<span class="hljs-keyword">const</span> inputBody = {
|
|
<span class="hljs-string">"title"</span>: <span class="hljs-string">"string"</span>,
|
|
<span class="hljs-string">"title"</span>: <span class="hljs-string">"string"</span>,
|
|
|
|
+ <span class="hljs-string">"sort"</span>: <span class="hljs-string">"string"</span>,
|
|
<span class="hljs-string">"parentId"</span>: <span class="hljs-string">"string"</span>,
|
|
<span class="hljs-string">"parentId"</span>: <span class="hljs-string">"string"</span>,
|
|
<span class="hljs-string">"description"</span>: <span class="hljs-string">"string"</span>,
|
|
<span class="hljs-string">"description"</span>: <span class="hljs-string">"string"</span>,
|
|
<span class="hljs-string">"color"</span>: <span class="hljs-string">"string"</span>,
|
|
<span class="hljs-string">"color"</span>: <span class="hljs-string">"string"</span>,
|
|
@@ -9261,6 +9278,7 @@ System.out.println(response.toString());
|
|
<p>Body parameter</p>
|
|
<p>Body parameter</p>
|
|
</blockquote>
|
|
</blockquote>
|
|
<pre class="highlight tab tab-yaml"><code><span class="hljs-attr">title:</span> <span class="hljs-string">string</span>
|
|
<pre class="highlight tab tab-yaml"><code><span class="hljs-attr">title:</span> <span class="hljs-string">string</span>
|
|
|
|
+<span class="hljs-attr">sort:</span> <span class="hljs-string">string</span>
|
|
<span class="hljs-attr">parentId:</span> <span class="hljs-string">string</span>
|
|
<span class="hljs-attr">parentId:</span> <span class="hljs-string">string</span>
|
|
<span class="hljs-attr">description:</span> <span class="hljs-string">string</span>
|
|
<span class="hljs-attr">description:</span> <span class="hljs-string">string</span>
|
|
<span class="hljs-attr">color:</span> <span class="hljs-string">string</span>
|
|
<span class="hljs-attr">color:</span> <span class="hljs-string">string</span>
|
|
@@ -9330,6 +9348,13 @@ System.out.println(response.toString());
|
|
<td>the new title of the card</td>
|
|
<td>the new title of the card</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
|
|
+<td>» sort</td>
|
|
|
|
+<td>body</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>false</td>
|
|
|
|
+<td>the new sort value of the card</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
<td>» parentId</td>
|
|
<td>» parentId</td>
|
|
<td>body</td>
|
|
<td>body</td>
|
|
<td>string</td>
|
|
<td>string</td>
|
|
@@ -10765,25 +10790,12 @@ System.out.println(response.toString());
|
|
<blockquote>
|
|
<blockquote>
|
|
<p>200 Response</p>
|
|
<p>200 Response</p>
|
|
</blockquote>
|
|
</blockquote>
|
|
-<pre class="highlight tab tab-json"><code>{
|
|
|
|
- <span class="hljs-attr">"boardIds"</span>: [
|
|
|
|
- <span class="hljs-string">"string"</span>
|
|
|
|
- ],
|
|
|
|
- <span class="hljs-attr">"name"</span>: <span class="hljs-string">"string"</span>,
|
|
|
|
- <span class="hljs-attr">"type"</span>: <span class="hljs-string">"text"</span>,
|
|
|
|
- <span class="hljs-attr">"settings"</span>: {
|
|
|
|
- <span class="hljs-attr">"currencyCode"</span>: <span class="hljs-string">"string"</span>,
|
|
|
|
- <span class="hljs-attr">"dropdownItems"</span>: [
|
|
|
|
- {}
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- <span class="hljs-attr">"showOnCard"</span>: <span class="hljs-literal">true</span>,
|
|
|
|
- <span class="hljs-attr">"automaticallyOnCard"</span>: <span class="hljs-literal">true</span>,
|
|
|
|
- <span class="hljs-attr">"alwaysOnCard"</span>: <span class="hljs-literal">true</span>,
|
|
|
|
- <span class="hljs-attr">"showLabelOnMiniCard"</span>: <span class="hljs-literal">true</span>,
|
|
|
|
- <span class="hljs-attr">"createdAt"</span>: <span class="hljs-string">"string"</span>,
|
|
|
|
- <span class="hljs-attr">"modifiedAt"</span>: <span class="hljs-string">"string"</span>
|
|
|
|
-}
|
|
|
|
|
|
+<pre class="highlight tab tab-json"><code>[
|
|
|
|
+ {
|
|
|
|
+ <span class="hljs-attr">"_id"</span>: <span class="hljs-string">"string"</span>,
|
|
|
|
+ <span class="hljs-attr">"boardIds"</span>: <span class="hljs-string">"string"</span>
|
|
|
|
+ }
|
|
|
|
+]
|
|
</code></pre>
|
|
</code></pre>
|
|
<h3 id="get_custom_field-responses">Responses</h3>
|
|
<h3 id="get_custom_field-responses">Responses</h3>
|
|
<table>
|
|
<table>
|
|
@@ -10800,7 +10812,36 @@ System.out.println(response.toString());
|
|
<td>200</td>
|
|
<td>200</td>
|
|
<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td>
|
|
<td><a href="https://tools.ietf.org/html/rfc7231#section-6.3.1">OK</a></td>
|
|
<td>200 response</td>
|
|
<td>200 response</td>
|
|
-<td><a href="#schemacustomfields">CustomFields</a></td>
|
|
|
|
|
|
+<td>Inline</td>
|
|
|
|
+</tr>
|
|
|
|
+</tbody>
|
|
|
|
+</table>
|
|
|
|
+<h3 id="get_custom_field-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>» _id</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>false</td>
|
|
|
|
+<td>none</td>
|
|
|
|
+<td>none</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>» boardIds</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>false</td>
|
|
|
|
+<td>none</td>
|
|
|
|
+<td>none</td>
|
|
</tr>
|
|
</tr>
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
@@ -11050,14 +11091,14 @@ System.out.println(response.toString());
|
|
<td>body</td>
|
|
<td>body</td>
|
|
<td>boolean</td>
|
|
<td>boolean</td>
|
|
<td>true</td>
|
|
<td>true</td>
|
|
-<td>should we show the custom field on cards?</td>
|
|
|
|
|
|
+<td>should we show the custom field on cards</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td>» automaticallyOnCard</td>
|
|
<td>» automaticallyOnCard</td>
|
|
<td>body</td>
|
|
<td>body</td>
|
|
<td>boolean</td>
|
|
<td>boolean</td>
|
|
<td>true</td>
|
|
<td>true</td>
|
|
-<td>should the custom fields automatically be added on cards?</td>
|
|
|
|
|
|
+<td>should the custom fields automatically be added on cards</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td>» alwaysOnCard</td>
|
|
<td>» alwaysOnCard</td>
|
|
@@ -11071,7 +11112,7 @@ System.out.println(response.toString());
|
|
<td>body</td>
|
|
<td>body</td>
|
|
<td>boolean</td>
|
|
<td>boolean</td>
|
|
<td>true</td>
|
|
<td>true</td>
|
|
-<td>should the label of the custom field be shown on minicards?</td>
|
|
|
|
|
|
+<td>should the label of the custom field be shown on minicards</td>
|
|
</tr>
|
|
</tr>
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
@@ -11363,6 +11404,774 @@ System.out.println(response.toString());
|
|
To perform this operation, you must be authenticated by means of one of the following methods:
|
|
To perform this operation, you must be authenticated by means of one of the following methods:
|
|
UserSecurity
|
|
UserSecurity
|
|
</aside>
|
|
</aside>
|
|
|
|
+<h2 id="add_custom_field_dropdown_items">add_custom_field_dropdown_items</h2>
|
|
|
|
+<p><a id="opIdadd_custom_field_dropdown_items"></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 POST /api/boards/{board}/custom-fields/{customField}/dropdown-items \
|
|
|
|
+ -H <span class="hljs-string">'Content-Type: multipart/form-data'</span> \
|
|
|
|
+ -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">POST</span> <span class="hljs-string">/api/boards/{board}/custom-fields/{customField}/dropdown-items</span> <span class="hljs-meta">HTTP/1.1</span>
|
|
|
|
+
|
|
|
|
+<span class="fortran">Content-<span class="hljs-keyword">Type</span>: multipart/<span class="hljs-keyword">form</span>-<span class="hljs-keyword">data</span>
|
|
|
|
+Accept: application/json
|
|
|
|
+
|
|
|
|
+</span></code></pre>
|
|
|
|
+<pre class="highlight tab tab-javascript"><code><span class="hljs-keyword">const</span> inputBody = <span class="hljs-string">'{
|
|
|
|
+ "items": "string"
|
|
|
|
+}'</span>;
|
|
|
|
+<span class="hljs-keyword">const</span> headers = {
|
|
|
|
+ <span class="hljs-string">'Content-Type'</span>:<span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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}/custom-fields/{customField}/dropdown-items'</span>,
|
|
|
|
+{
|
|
|
|
+ <span class="hljs-attr">method</span>: <span class="hljs-string">'POST'</span>,
|
|
|
|
+ <span class="hljs-attr">body</span>: inputBody,
|
|
|
|
+ <span class="hljs-attr">headers</span>: headers
|
|
|
|
+})
|
|
|
|
+.then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) </span>{
|
|
|
|
+ <span class="hljs-keyword">return</span> res.json();
|
|
|
|
+}).then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">body</span>) </span>{
|
|
|
|
+ <span class="hljs-built_in">console</span>.log(body);
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<pre class="highlight tab tab-javascript--nodejs"><code><span class="hljs-keyword">const</span> fetch = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node-fetch'</span>);
|
|
|
|
+<span class="hljs-keyword">const</span> inputBody = {
|
|
|
|
+ <span class="hljs-string">"items"</span>: <span class="hljs-string">"string"</span>
|
|
|
|
+};
|
|
|
|
+<span class="hljs-keyword">const</span> headers = {
|
|
|
|
+ <span class="hljs-string">'Content-Type'</span>:<span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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}/custom-fields/{customField}/dropdown-items'</span>,
|
|
|
|
+{
|
|
|
|
+ <span class="hljs-attr">method</span>: <span class="hljs-string">'POST'</span>,
|
|
|
|
+ <span class="hljs-attr">body</span>: <span class="hljs-built_in">JSON</span>.stringify(inputBody),
|
|
|
|
+ <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">'Content-Type'</span> => <span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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.post <span class="hljs-string">'/api/boards/{board}/custom-fields/{customField}/dropdown-items'</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">'Content-Type'</span>: <span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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.post(<span class="hljs-string">'/api/boards/{board}/custom-fields/{customField}/dropdown-items'</span>, headers = headers)
|
|
|
|
+
|
|
|
|
+<span class="hljs-built_in">print</span>(r.json())
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<pre class="highlight tab tab-java"><code>URL obj = <span class="hljs-keyword">new</span> URL(<span class="hljs-string">"/api/boards/{board}/custom-fields/{customField}/dropdown-items"</span>);
|
|
|
|
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
|
|
|
|
+con.setRequestMethod(<span class="hljs-string">"POST"</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">"Content-Type"</span>: []<span class="hljs-keyword">string</span>{<span class="hljs-string">"multipart/form-data"</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">"POST"</span>, <span class="hljs-string">"/api/boards/{board}/custom-fields/{customField}/dropdown-items"</span>, data)
|
|
|
|
+ req.Header = headers
|
|
|
|
+
|
|
|
|
+ client := &http.Client{}
|
|
|
|
+ resp, err := client.Do(req)
|
|
|
|
+ <span class="hljs-comment">// ...</span>
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<pre class="highlight tab tab-php"><code> <span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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>,
|
|
|
|
+);
|
|
|
|
+
|
|
|
|
+<span class="hljs-variable">$client</span> = <span class="hljs-keyword">new</span> \GuzzleHttp\Client();
|
|
|
|
+
|
|
|
|
+<span class="hljs-comment">// Define array of request body.</span>
|
|
|
|
+<span class="hljs-variable">$request_body</span> = <span class="hljs-keyword">array</span>();
|
|
|
|
+
|
|
|
|
+<span class="hljs-keyword">try</span> {
|
|
|
|
+ <span class="hljs-variable">$response</span> = <span class="hljs-variable">$client</span>->request(<span class="hljs-string">'POST'</span>,<span class="hljs-string">'/api/boards/{board}/custom-fields/{customField}/dropdown-items'</span>, <span class="hljs-keyword">array</span>(
|
|
|
|
+ <span class="hljs-string">'headers'</span> => <span class="hljs-variable">$headers</span>,
|
|
|
|
+ <span class="hljs-string">'json'</span> => <span class="hljs-variable">$request_body</span>,
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+ print_r(<span class="hljs-variable">$response</span>->getBody()->getContents());
|
|
|
|
+ }
|
|
|
|
+ <span class="hljs-keyword">catch</span> (\GuzzleHttp\<span class="hljs-built_in">Exception</span>\BadResponseException <span class="hljs-variable">$e</span>) {
|
|
|
|
+ <span class="hljs-comment">// handle exception or api errors.</span>
|
|
|
|
+ print_r(<span class="hljs-variable">$e</span>->getMessage());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ <span class="hljs-comment">// ...</span>
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<p><code>POST /api/boards/{board}/custom-fields/{customField}/dropdown-items</code></p>
|
|
|
|
+<p><em>Update a Custom Field's dropdown items</em></p>
|
|
|
|
+<blockquote>
|
|
|
|
+<p>Body parameter</p>
|
|
|
|
+</blockquote>
|
|
|
|
+<pre class="highlight tab tab-yaml"><code><span class="hljs-attr">items:</span> <span class="hljs-string">string</span>
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<h3 id="add_custom_field_dropdown_items-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 value</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>customField</td>
|
|
|
|
+<td>path</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>true</td>
|
|
|
|
+<td>the customField value</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>body</td>
|
|
|
|
+<td>body</td>
|
|
|
|
+<td>object</td>
|
|
|
|
+<td>false</td>
|
|
|
|
+<td>none</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>» items</td>
|
|
|
|
+<td>body</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>false</td>
|
|
|
|
+<td>names of the custom field</td>
|
|
|
|
+</tr>
|
|
|
|
+</tbody>
|
|
|
|
+</table>
|
|
|
|
+<blockquote>
|
|
|
|
+<p>Example responses</p>
|
|
|
|
+</blockquote>
|
|
|
|
+<blockquote>
|
|
|
|
+<p>200 Response</p>
|
|
|
|
+</blockquote>
|
|
|
|
+<pre class="highlight tab tab-json"><code>{
|
|
|
|
+ <span class="hljs-attr">"_id"</span>: <span class="hljs-string">"string"</span>
|
|
|
|
+}
|
|
|
|
+</code></pre>
|
|
|
|
+<h3 id="add_custom_field_dropdown_items-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="add_custom_field_dropdown_items-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>» _id</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="edit_custom_field_dropdown_item">edit_custom_field_dropdown_item</h2>
|
|
|
|
+<p><a id="opIdedit_custom_field_dropdown_item"></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 PUT /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem} \
|
|
|
|
+ -H <span class="hljs-string">'Content-Type: multipart/form-data'</span> \
|
|
|
|
+ -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">PUT</span> <span class="hljs-string">/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}</span> <span class="hljs-meta">HTTP/1.1</span>
|
|
|
|
+
|
|
|
|
+<span class="fortran">Content-<span class="hljs-keyword">Type</span>: multipart/<span class="hljs-keyword">form</span>-<span class="hljs-keyword">data</span>
|
|
|
|
+Accept: application/json
|
|
|
|
+
|
|
|
|
+</span></code></pre>
|
|
|
|
+<pre class="highlight tab tab-javascript"><code><span class="hljs-keyword">const</span> inputBody = <span class="hljs-string">'{
|
|
|
|
+ "name": "string"
|
|
|
|
+}'</span>;
|
|
|
|
+<span class="hljs-keyword">const</span> headers = {
|
|
|
|
+ <span class="hljs-string">'Content-Type'</span>:<span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</span>,
|
|
|
|
+{
|
|
|
|
+ <span class="hljs-attr">method</span>: <span class="hljs-string">'PUT'</span>,
|
|
|
|
+ <span class="hljs-attr">body</span>: inputBody,
|
|
|
|
+ <span class="hljs-attr">headers</span>: headers
|
|
|
|
+})
|
|
|
|
+.then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) </span>{
|
|
|
|
+ <span class="hljs-keyword">return</span> res.json();
|
|
|
|
+}).then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">body</span>) </span>{
|
|
|
|
+ <span class="hljs-built_in">console</span>.log(body);
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<pre class="highlight tab tab-javascript--nodejs"><code><span class="hljs-keyword">const</span> fetch = <span class="hljs-built_in">require</span>(<span class="hljs-string">'node-fetch'</span>);
|
|
|
|
+<span class="hljs-keyword">const</span> inputBody = {
|
|
|
|
+ <span class="hljs-string">"name"</span>: <span class="hljs-string">"string"</span>
|
|
|
|
+};
|
|
|
|
+<span class="hljs-keyword">const</span> headers = {
|
|
|
|
+ <span class="hljs-string">'Content-Type'</span>:<span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</span>,
|
|
|
|
+{
|
|
|
|
+ <span class="hljs-attr">method</span>: <span class="hljs-string">'PUT'</span>,
|
|
|
|
+ <span class="hljs-attr">body</span>: <span class="hljs-built_in">JSON</span>.stringify(inputBody),
|
|
|
|
+ <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">'Content-Type'</span> => <span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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.put <span class="hljs-string">'/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</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">'Content-Type'</span>: <span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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.put(<span class="hljs-string">'/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</span>, headers = headers)
|
|
|
|
+
|
|
|
|
+<span class="hljs-built_in">print</span>(r.json())
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<pre class="highlight tab tab-java"><code>URL obj = <span class="hljs-keyword">new</span> URL(<span class="hljs-string">"/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}"</span>);
|
|
|
|
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
|
|
|
|
+con.setRequestMethod(<span class="hljs-string">"PUT"</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">"Content-Type"</span>: []<span class="hljs-keyword">string</span>{<span class="hljs-string">"multipart/form-data"</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">"PUT"</span>, <span class="hljs-string">"/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}"</span>, data)
|
|
|
|
+ req.Header = headers
|
|
|
|
+
|
|
|
|
+ client := &http.Client{}
|
|
|
|
+ resp, err := client.Do(req)
|
|
|
|
+ <span class="hljs-comment">// ...</span>
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<pre class="highlight tab tab-php"><code> <span class="hljs-string">'multipart/form-data'</span>,
|
|
|
|
+ <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>,
|
|
|
|
+);
|
|
|
|
+
|
|
|
|
+<span class="hljs-variable">$client</span> = <span class="hljs-keyword">new</span> \GuzzleHttp\Client();
|
|
|
|
+
|
|
|
|
+<span class="hljs-comment">// Define array of request body.</span>
|
|
|
|
+<span class="hljs-variable">$request_body</span> = <span class="hljs-keyword">array</span>();
|
|
|
|
+
|
|
|
|
+<span class="hljs-keyword">try</span> {
|
|
|
|
+ <span class="hljs-variable">$response</span> = <span class="hljs-variable">$client</span>->request(<span class="hljs-string">'PUT'</span>,<span class="hljs-string">'/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</span>, <span class="hljs-keyword">array</span>(
|
|
|
|
+ <span class="hljs-string">'headers'</span> => <span class="hljs-variable">$headers</span>,
|
|
|
|
+ <span class="hljs-string">'json'</span> => <span class="hljs-variable">$request_body</span>,
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+ print_r(<span class="hljs-variable">$response</span>->getBody()->getContents());
|
|
|
|
+ }
|
|
|
|
+ <span class="hljs-keyword">catch</span> (\GuzzleHttp\<span class="hljs-built_in">Exception</span>\BadResponseException <span class="hljs-variable">$e</span>) {
|
|
|
|
+ <span class="hljs-comment">// handle exception or api errors.</span>
|
|
|
|
+ print_r(<span class="hljs-variable">$e</span>->getMessage());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ <span class="hljs-comment">// ...</span>
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<p><code>PUT /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}</code></p>
|
|
|
|
+<p><em>Update a Custom Field's dropdown item</em></p>
|
|
|
|
+<blockquote>
|
|
|
|
+<p>Body parameter</p>
|
|
|
|
+</blockquote>
|
|
|
|
+<pre class="highlight tab tab-yaml"><code><span class="hljs-attr">name:</span> <span class="hljs-string">string</span>
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<h3 id="edit_custom_field_dropdown_item-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 value</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>customField</td>
|
|
|
|
+<td>path</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>true</td>
|
|
|
|
+<td>the customField value</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>dropdownItem</td>
|
|
|
|
+<td>path</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>true</td>
|
|
|
|
+<td>the dropdownItem value</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>body</td>
|
|
|
|
+<td>body</td>
|
|
|
|
+<td>object</td>
|
|
|
|
+<td>true</td>
|
|
|
|
+<td>none</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>» name</td>
|
|
|
|
+<td>body</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>true</td>
|
|
|
|
+<td>names of the custom field</td>
|
|
|
|
+</tr>
|
|
|
|
+</tbody>
|
|
|
|
+</table>
|
|
|
|
+<blockquote>
|
|
|
|
+<p>Example responses</p>
|
|
|
|
+</blockquote>
|
|
|
|
+<blockquote>
|
|
|
|
+<p>200 Response</p>
|
|
|
|
+</blockquote>
|
|
|
|
+<pre class="highlight tab tab-json"><code>{
|
|
|
|
+ <span class="hljs-attr">"_id"</span>: <span class="hljs-string">"string"</span>
|
|
|
|
+}
|
|
|
|
+</code></pre>
|
|
|
|
+<h3 id="edit_custom_field_dropdown_item-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="edit_custom_field_dropdown_item-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>» _id</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="delete_custom_field_dropdown_item">delete_custom_field_dropdown_item</h2>
|
|
|
|
+<p><a id="opIddelete_custom_field_dropdown_item"></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 DELETE /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem} \
|
|
|
|
+ -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">DELETE</span> <span class="hljs-string">/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}</span> <span class="hljs-meta">HTTP/1.1</span>
|
|
|
|
+
|
|
|
|
+<span class="ada"><span class="hljs-keyword">Accept</span>: application/json
|
|
|
|
+
|
|
|
|
+</span></code></pre>
|
|
|
|
+<pre class="highlight tab tab-javascript"><code>
|
|
|
|
+<span class="hljs-keyword">const</span> headers = {
|
|
|
|
+ <span class="hljs-string">'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}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</span>,
|
|
|
|
+{
|
|
|
|
+ <span class="hljs-attr">method</span>: <span class="hljs-string">'DELETE'</span>,
|
|
|
|
+
|
|
|
|
+ <span class="hljs-attr">headers</span>: headers
|
|
|
|
+})
|
|
|
|
+.then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">res</span>) </span>{
|
|
|
|
+ <span class="hljs-keyword">return</span> res.json();
|
|
|
|
+}).then(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">body</span>) </span>{
|
|
|
|
+ <span class="hljs-built_in">console</span>.log(body);
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<pre class="highlight tab tab-javascript--nodejs"><code><span class="hljs-keyword">const</span> fetch = <span class="hljs-built_in">require</span>(<span class="hljs-string">'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}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</span>,
|
|
|
|
+{
|
|
|
|
+ <span class="hljs-attr">method</span>: <span class="hljs-string">'DELETE'</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.delete <span class="hljs-string">'/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</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.delete(<span class="hljs-string">'/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</span>, headers = headers)
|
|
|
|
+
|
|
|
|
+<span class="hljs-built_in">print</span>(r.json())
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<pre class="highlight tab tab-java"><code>URL obj = <span class="hljs-keyword">new</span> URL(<span class="hljs-string">"/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}"</span>);
|
|
|
|
+HttpURLConnection con = (HttpURLConnection) obj.openConnection();
|
|
|
|
+con.setRequestMethod(<span class="hljs-string">"DELETE"</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">"DELETE"</span>, <span class="hljs-string">"/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}"</span>, data)
|
|
|
|
+ req.Header = headers
|
|
|
|
+
|
|
|
|
+ client := &http.Client{}
|
|
|
|
+ resp, err := client.Do(req)
|
|
|
|
+ <span class="hljs-comment">// ...</span>
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<pre class="highlight tab tab-php"><code> <span class="hljs-string">'application/json'</span>,
|
|
|
|
+ <span class="hljs-string">'Authorization'</span> => <span class="hljs-string">'API_KEY'</span>,
|
|
|
|
+);
|
|
|
|
+
|
|
|
|
+<span class="hljs-variable">$client</span> = <span class="hljs-keyword">new</span> \GuzzleHttp\Client();
|
|
|
|
+
|
|
|
|
+<span class="hljs-comment">// Define array of request body.</span>
|
|
|
|
+<span class="hljs-variable">$request_body</span> = <span class="hljs-keyword">array</span>();
|
|
|
|
+
|
|
|
|
+<span class="hljs-keyword">try</span> {
|
|
|
|
+ <span class="hljs-variable">$response</span> = <span class="hljs-variable">$client</span>->request(<span class="hljs-string">'DELETE'</span>,<span class="hljs-string">'/api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}'</span>, <span class="hljs-keyword">array</span>(
|
|
|
|
+ <span class="hljs-string">'headers'</span> => <span class="hljs-variable">$headers</span>,
|
|
|
|
+ <span class="hljs-string">'json'</span> => <span class="hljs-variable">$request_body</span>,
|
|
|
|
+ )
|
|
|
|
+ );
|
|
|
|
+ print_r(<span class="hljs-variable">$response</span>->getBody()->getContents());
|
|
|
|
+ }
|
|
|
|
+ <span class="hljs-keyword">catch</span> (\GuzzleHttp\<span class="hljs-built_in">Exception</span>\BadResponseException <span class="hljs-variable">$e</span>) {
|
|
|
|
+ <span class="hljs-comment">// handle exception or api errors.</span>
|
|
|
|
+ print_r(<span class="hljs-variable">$e</span>->getMessage());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ <span class="hljs-comment">// ...</span>
|
|
|
|
+
|
|
|
|
+</code></pre>
|
|
|
|
+<p><code>DELETE /api/boards/{board}/custom-fields/{customField}/dropdown-items/{dropdownItem}</code></p>
|
|
|
|
+<p><em>Update a Custom Field's dropdown items</em></p>
|
|
|
|
+<h3 id="delete_custom_field_dropdown_item-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 value</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>customField</td>
|
|
|
|
+<td>path</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>true</td>
|
|
|
|
+<td>the customField value</td>
|
|
|
|
+</tr>
|
|
|
|
+<tr>
|
|
|
|
+<td>dropdownItem</td>
|
|
|
|
+<td>path</td>
|
|
|
|
+<td>string</td>
|
|
|
|
+<td>true</td>
|
|
|
|
+<td>the dropdownItem value</td>
|
|
|
|
+</tr>
|
|
|
|
+</tbody>
|
|
|
|
+</table>
|
|
|
|
+<blockquote>
|
|
|
|
+<p>Example responses</p>
|
|
|
|
+</blockquote>
|
|
|
|
+<blockquote>
|
|
|
|
+<p>200 Response</p>
|
|
|
|
+</blockquote>
|
|
|
|
+<pre class="highlight tab tab-json"><code>{
|
|
|
|
+ <span class="hljs-attr">"_id"</span>: <span class="hljs-string">"string"</span>
|
|
|
|
+}
|
|
|
|
+</code></pre>
|
|
|
|
+<h3 id="delete_custom_field_dropdown_item-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="delete_custom_field_dropdown_item-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>» _id</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>
|
|
<h1 id="wekan-rest-api-integrations">Integrations</h1>
|
|
<h1 id="wekan-rest-api-integrations">Integrations</h1>
|
|
<h2 id="get_all_integrations">get_all_integrations</h2>
|
|
<h2 id="get_all_integrations">get_all_integrations</h2>
|
|
<p><a id="opIdget_all_integrations"></a></p>
|
|
<p><a id="opIdget_all_integrations"></a></p>
|