Wekan REST API v6.55
+Wekan REST API v6.56
@@ -16358,6 +16363,265 @@ System.out.println(response.toString()); To perform this operation, you must be authenticated by means of one of the following methods: UserSecurity +Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
delete_user_token
+ +++Code samples
+
# You can also use wget
+curl -X POST /api/deletetoken \
+ -H 'Content-Type: multipart/form-data' \
+ -H 'Accept: application/json' \
+ -H 'Authorization: API_KEY'
+
+
+POST /api/deletetoken HTTP/1.1
+
+Content-Type: multipart/form-data
+Accept: application/json
+
+
+const inputBody = '{
+ "userId": "string",
+ "token": "string"
+}';
+const headers = {
+ 'Content-Type':'multipart/form-data',
+ 'Accept':'application/json',
+ 'Authorization':'API_KEY'
+};
+
+fetch('/api/deletetoken',
+{
+ method: 'POST',
+ body: inputBody,
+ headers: headers
+})
+.then(function(res) {
+ return res.json();
+}).then(function(body) {
+ console.log(body);
+});
+
+
+const fetch = require('node-fetch');
+const inputBody = {
+ "userId": "string",
+ "token": "string"
+};
+const headers = {
+ 'Content-Type':'multipart/form-data',
+ 'Accept':'application/json',
+ 'Authorization':'API_KEY'
+};
+
+fetch('/api/deletetoken',
+{
+ method: 'POST',
+ body: JSON.stringify(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/deletetoken',
+ 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/deletetoken', headers = headers)
+
+print(r.json())
+
+
+URL obj = new URL("/api/deletetoken");
+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/deletetoken", data)
+ req.Header = headers
+
+ client := &http.Client{}
+ resp, err := client.Do(req)
+ // ...
+}
+
+
+ 'multipart/form-data',
+ 'Accept' => 'application/json',
+ 'Authorization' => 'API_KEY',
+);
+
+$client = new \GuzzleHttp\Client();
+
+// Define array of request body.
+$request_body = array();
+
+try {
+ $response = $client->request('POST','/api/deletetoken', array(
+ 'headers' => $headers,
+ 'json' => $request_body,
+ )
+ );
+ print_r($response->getBody()->getContents());
+ }
+ catch (\GuzzleHttp\Exception\BadResponseException $e) {
+ // handle exception or api errors.
+ print_r($e->getMessage());
+ }
+
+ // ...
+
+
+POST /api/deletetoken
Delete one or all user token.
+Only the admin user (the first user) can call the REST API.
+++Body parameter
+
userId: string
+token: string
+
+
+Parameters
+Name | +In | +Type | +Required | +Description | +
---|---|---|---|---|
body | +body | +object | +true | +none | +
» userId | +body | +string | +true | +the user ID | +
» token | +body | +string | +true | +the user hashedToken | +
++Example responses
+
++200 Response
+
{
+ "message": "string"
+}
+
+Responses
+Status | +Meaning | +Description | +Schema | +
---|---|---|---|
200 | +OK | +200 response | +Inline | +
Response Schema
+Status Code 200
+Name | +Type | +Required | +Restrictions | +Description | +
---|---|---|---|---|
» message | +string | +false | +none | +none | +
get_current_user
diff --git a/public/api/wekan.yml b/public/api/wekan.yml index 0115010bf..9e48cdebe 100644 --- a/public/api/wekan.yml +++ b/public/api/wekan.yml @@ -1,7 +1,7 @@ swagger: '2.0' info: title: Wekan REST API - version: v6.55 + version: v6.56 description: | The REST API allows you to control and extend Wekan with ease. @@ -2497,6 +2497,43 @@ paths: properties: _id: type: string + /api/deletetoken: + post: + operationId: delete_user_token + summary: Delete one or all user token. + description: | + Only the admin user (the first user) can call the REST API. + tags: + - Users + consumes: + - multipart/form-data + - application/json + parameters: + - name: userId + in: formData + description: | + the user ID + type: string + required: true + - name: token + in: formData + description: | + the user hashedToken + type: string + required: true + produces: + - application/json + security: + - UserSecurity: [] + responses: + '200': + description: |- + 200 response + schema: + type: object + properties: + message: + type: string /api/user: get: operationId: get_current_user diff --git a/sandstorm-pkgdef.capnp b/sandstorm-pkgdef.capnp index 5a8b29816..acce30578 100644 --- a/sandstorm-pkgdef.capnp +++ b/sandstorm-pkgdef.capnp @@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = ( appTitle = (defaultText = "Wekan"), # The name of the app as it is displayed to the user. - appVersion = 655, + appVersion = 656, # Increment this for every release. - appMarketingVersion = (defaultText = "6.54.0~2022-10-24"), + appMarketingVersion = (defaultText = "6.56.0~2022-11-22"), # Human-readable presentation of the app version. minUpgradableAppVersion = 0, diff --git a/snapcraft.yaml b/snapcraft.yaml index 2903ae422..6d0027303 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1,5 +1,5 @@ name: wekan -version: '6.55' +version: '6.56' base: core20 summary: Open Source kanban description: | @@ -65,7 +65,7 @@ apps: parts: mongodb: - source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-5.0.13.tgz + source: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-5.0.14.tgz plugin: dump stage-packages: - libssl1.1 @@ -160,9 +160,9 @@ parts: # Cleanup mkdir .build cd .build - wget https://github.com/wekan/wekan/releases/download/v6.55/wekan-6.55-amd64.zip - unzip wekan-6.55-amd64.zip - rm wekan-6.55-amd64.zip + wget https://github.com/wekan/wekan/releases/download/v6.56/wekan-6.56-amd64.zip + unzip wekan-6.56-amd64.zip + rm wekan-6.56-amd64.zip cd .. ##cd .build/bundle ##find . -type d -name '*-garbage*' | xargs rm -rf