Reorganized Docs. In Progress.

This commit is contained in:
Lauri Ojansivu 2024-06-27 11:08:43 +03:00
parent 1961e22cbd
commit ce89ff4833
202 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,68 @@
Info for Self-Hosted RocketChat Community Server, using RocketChat server Snap from https://snapcraft.io/rocketchat-server
## Install snapd
Linux:
https://snapcraft.io/docs/installing-snapd
Windows:
https://github.com/wekan/hx/tree/main/prototypes/ui/gambas#install-on-windows
## Install RocketChat Snap
```
sudo snap install rocketchat-server
```
## Setup siteurl
List current Snap settings:
```
sudo snap get rocketchat-server
```
Then set your siteurl of your RocketChat server:
```
sudo snap set rocketchat-server siteurl='https://chat.yourcompany.com'
```
## RocketChat Skip Install Registration Wizard Fix
Q:
- [RocketChat Skip Install Registration Wizard Fix](https://github.com/RocketChat/Rocket.Chat/issues/31163#issuecomment-1848364117)
A:
For someone using snap, it means creating a file `/var/snap/rocketchat-server/common/override-setup-wizard.env ` (the name of the file itself could be anything as long as it has an .env extension) and setting its content to `OVERWRITE_SETTING_Show_Setup_Wizard=completed`
Then, restarting the server by `systemctl restart snap.rocketchat-server.rocketchat-server.service`
If it does not work yet, then reboot.
## Workspace version unsupported
Q:
- [Workspace version unsupported, Self-Host Community Server](https://forums.rocket.chat/t/workspace-version-unsupported-self-host-community-server/19698)
A:
1) Change to newest Snap Stable channel, list at https://snapcraft.io/rocketchat-server dropdown menu
```
sudo snap refresh rocketchat-server --channel=6.x/stable --amend
```
2) Register your Self-Managed instance here, so login and mobile app start to work after that:
- https://cloud.rocket.chat/home
- https://chat.yourcompany.com/admin/subscription
## More RocketChat Snap related info
https://github.com/wekan/wekan/wiki/OAuth2
https://docs.rocket.chat/deploy/deploy-rocket.chat/deploy-with-snaps

21
docs/Webhooks/Java.md Normal file
View file

@ -0,0 +1,21 @@
This page is about using Wekan from Java code.
Wekan is made with Javascript and uses MongoDB database.
## Using Wekan REST API
With Jython, you can use Wekan REST API [like with Python](New-card-with-Python3-and-REST-API)
## Global Webhooks
For Global Webhooks in Admin Panel, Wekan sends all events in all boards to webhook URL, like add card. Although, sending some messages for some events is not yet implemented, more could be added later.
Data is sent in [this kind of JSON format](Webhook-data).
[You can receive webhook data in Java like this](https://github.com/Esri/webhooks-samples/tree/master/java/receiver).
Then for each received data, your code can read content and based on incoming data call Wekan REST API, some Java interface, etc.
Outgoing Webhooks can also go to Slack, RocketChat, NodeRED, PowerShell etc. See right menu webhook links when scrolling down wiki page https://github.com/wekan/wekan/wiki
If you call some Java interface that returns some data, you can then write that data to Wekan card with Wekan REST API.

View file

@ -0,0 +1,37 @@
- [RocketChat Webhook workaround](https://github.com/wekan/univention/issues/15)
Note: Webhook to Slack and Rocket.Chat does not require adding anything to URL. Discord requires adding `/slack` to end of URL so that it works.
<img src="https://wekan.github.io/outgoing-webhook-discord.gif" alt="Outgoing Webhook to Discord" />
1. Add Webhook to Discord
2. On Wekan board, click 3 lines "hamburger" menu / Outgoing Webhooks.
3. Add /slack to end of your Discord Webhook URL and Save URL, like this:
```
https://discordapp.com/api/webhooks/12345/abcde/slack
```
Wekan Outgoing Webhook URLs are in Slack/Rocket.Chat/Discord format.
Note: Not all Wekan activities create Outgoing Webhook events. Missing activities [have been added](https://github.com/wekan/wekan/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+webhook) to [Wekan Roadmap](https://github.com/wekan/wekan/projects/2). If you find some activity that does not yet have GitHub issue about it, please add new GitHub issue.
Wekan uses this type of JSON when sending to Outgoing Webhook:
https://github.com/wekan/wekan/wiki/Webhook-data
Discord supports incoming webhooks in different formats, like GitHub, Slack, etc. The incoming format needs to be specified by adding webhook format to end of URL.
https://discordapp.com/developers/docs/resources/webhook#execute-slackcompatible-webhook
Wekan generated webhooks are Slack compatible. Discord does not know anything about Wekan, Rocket.Chat, and other apps that produce Slack compatible Outgoing Webhook format. But using any other format like GitHub etc does not work, because Wekan Outgoing Webhooks are not in that format.
When making Wekan Outgoing Webhook to Rocket.Chat and Slack, there is no need to add anything to Webhook URL when those that is added to Wekan board. Discord in this case has decided to implement multiple Incoming Webhook formats and require specifying format in URL.
## Riot
Wekan boards have Outgoing Webhooks for board change messages, those can be bridged to Riot:
https://github.com/vector-im/riot-web/issues/4978
If you have some Riot bot, you can make it call Wekan REST API to make changes to Wekan.
First [login to API as form data, with admin username and password](REST-API#example-call---as-form-data). Then use that Bearer token [to edit Wekan](https://wekan.github.io/api/).

View file

@ -0,0 +1,20 @@
REQUIRED: Your webhook should reply 200 OK immediately after receiving webhook, so that WeKan continues working:
https://github.com/wekan/wekan/issues/5077#event-10054506387
https://github.com/wekan/webhook/blob/main/public/index.php#L48C1-L48C1
***
For receiving webhooks on local network, you could use:
1) Some web form with PHP/Python/other backend, Google search for example code
how to receive webhook.
2) [NodeRED](https://github.com/wekan/wekan/issues/2017)
3) [Huginn or Flogo etc](https://github.com/wekan/wekan/issues/1160)
4) [Java](https://github.com/wekan/wekan/issues/2961#issuecomment-601599745)
At Internet you could use for example Zapier.

View file

@ -0,0 +1,12 @@
Because NodeJS uses an [hardcoded list of certificates](https://github.com/nodejs/node/issues/4175) if you deploy a site (receiving the webhook from wekan) behind a reverse proxy on https with a Let's Encrypt certificate you may have a problem: Let's Encrypt's CA is not recognized. The correct answer is [here](https://stackoverflow.com/questions/29283040/how-to-add-custom-certificate-authority-ca-to-nodejs/47160447#47160447).
* Download the Lets Encrypt Authority X3 (IdenTrust cross-signed) from [here](https://letsencrypt.org/certificates/)
```sh
cd /etc/ssl/certs
wget https://letsencrypt.org/certs/lets-encrypt-x3-cross-signed.pem.txt -O lets-encrypt-x3-cross-signed.pem
```
* Now start the application with
```sh
NODE_EXTRA_CA_CERTS=/etc/ssl/certs/lets-encrypt-x3-cross-signed.pem node main.js
```

View file

@ -0,0 +1,360 @@
# Webhook data
When a webhook is activated it sends the related information within the POST request body.
## Cards
### Creation
When a new card is created on board
```json
{
"text": "{{wekan-username}} created card \"{{card-title}}\" to list \"{{list-name}}\" at swimlane \"{{swimlane-name}}\" at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"listId": "{{list-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"swimlaneId": "{{swimlane-id}}",
"description": "act-createCard"
}
```
### Move
When a card is moved beweteen lists
```json
{
"text": "{{wekan-username}} moved card \"{{card-title}}\" at board \"{{board-name}}\" from list \"{{old-list-name}}\" at swimlane \"{{swimlane-name}}\" to list \"{{new-list-name}}\" at swimlane \"{{swimlane-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"listId": "{{new-list-id}}",
"oldListId": "{{old-list-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"swimlaneId": "{{swimlane-id}}",
"description": "act-moveCard"
}
```
### Archival
A card is moved to archive
```json
{
"text": "{{wekan-username}} Card \"{{card-title}}\" at list \"{{list-name}}\" at swimlane \"{{swimlane-name}}\" at board \"{{board-name}}\" moved to Archive\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"listId": "{{list-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"swimlaneId": "{{swimlane-id}}",
"description": "act-archivedCard"
}
```
### Restored
When a card is restored from archive
```json
{
"text": "{{wekan-username}} restored card \"{{card-title}}\" to list \"{{list-name}}\" at swimlane \"{{swimlane-name}}\" at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"listId": "{{list-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"swimlaneId": "{{swimlane-id}}",
"description": "act-restoredCard"
}
```
## Card content
Webhooks that are raised on card content change
### Comment creation
A user comments the card
```json
{
"text": "{{wekan-username}} commented on card \"{{card-title}}\": \"{{comment}}\" at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"comment": "{{comment}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"commentId": "{{comment-id}}",
"description": "act-addComment"
}
```
### Comment edit
A user edits a comment on the card
```json
{
"text": "{{wekan-username}} commented on card \"{{card-title}}\": \"{{comment}}\" at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"listId": "{{list-id}}",
"boardId": "{{board-id}}",
"comment": "{{comment}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"commentId": "{{comment-id}}",
"swimlaneId": "{{swimlane-id}}",
"description": "act-editComment"
}
```
### AddLabel
A label is added to card
```json
{
"text": "{{wekan-username}} Added label __label__ to card \"{{card-title}}\" at list \"{{list-name}}\" at swimlane \"{{swimlane-name}}\" at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"listId": "{{list-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"swimlaneId": "{{swimlane-id}}",
"description": "act-addedLabel"
}
```
### Join member
When a member is added to card
```json
{
"text": "{{wekan-username}} added member {{wekan-username}} to card \"{{card-title}}\" at list \"{{list-name}}\" at swimlane \"{{swimlane-name}}\" at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"listId": "{{list-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"swimlaneId": "{{swimlane-id}}",
"description": "act-joinMember"
}
```
### Set custom field
A custom field on card is set
```json
{
"text": "{{wekan-username}} act-setCustomField\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"description": "act-setCustomField"
}
```
### Add attachment
```json
{
"text": "{{wekan-username}} added attachment {{attachment-id}} to card \"{{card-title}}\" at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"description": "act-addAttachment"
}
```
### Delete attachment
```json
{
"text": "{{wekan-username}} deleted attachment __attachment__ at card \"{{card-title}}\" at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"description": "act-deleteAttachment"
}
```
### Add checklist
```json
{
"text": "{{wekan-username}} added checklist \"{{checklist-name}}\" to card \"{{card-title}}\" at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"description": "act-addChecklist"
}
```
### Remove checklist
```json
{
"text": "{{wekan-username}} removed checklist \"{{checklist-name}}\" from card \"{{card-title}}\" at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"description": "act-removeChecklist"
}
```
### Uncomplete checklist
```json
{
"text": "{{wekan-username}} uncompleted checklist \"{{checklist-name}}\" at card \"{{card-title}}\" at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"description": "act-uncompleteChecklist"
}
```
### Add checklist item
```json
{
"text": "{{wekan-username}} added checklist item {{checklistitem-name}} to checklist \"{{checklist-name}}\" at card \"{{card-title}}\" at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"description": "act-addChecklistItem"
}
```
### Checked item
```json
{
"text": "{{wekan-username}} checked {{checklist-name}} of checklist \"{{checklist-name}}\" at card \"{{card-title}}\" at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"description": "act-checkedItem"
}
```
### Removed checklist item
```json
{
"text": "{{wekan-username}} act-removedChecklistItem\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}/{{card-id}}",
"cardId": "{{card-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"card": "{{card-title}}",
"description": "act-removedChecklistItem"
}
```
## Board
Webhooks that are raised on board events
### Create custom field
```json
{
"text": "{{wekan-username}} created custom field {{customfield-name}} to card __card__ at list __list__ at swimlane __swimlane__ at board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"description": "act-createCustomField"
}
```
## Lists
Webhooks that are raised on list events
### Create list
```json
{
"text": "{{wekan-username}} added list \"{{list-name}}\" to board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}",
"listId": "{{list-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"description": "act-createList"
}
```
### Archived list
```json
{
"text": "{{wekan-username}} List \"{{list-name}}\" at swimlane __swimlane__ at board \"{{board-name}}\" moved to Archive\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}",
"listId": "{{list-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"description": "act-archivedList"
}
```
### Remove list
```json
{
"text": "{{wekan-username}} act-removeList\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}",
"listId": "{{list-id}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"description": "act-removeList"
}
```
## Swimlane
### Create swimlane
```json
{
"text": "{{wekan-username}} created swimlane \"{{swimlane-name}}\" to board \"{{board-name}}\"\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"swimlaneId": "{{swimlane-id}}",
"description": "act-createSwimlane"
}
```
### Archived swimlane
```json
{
"text": "{{wekan-username}} Swimlane \"{{swimlane-name}}\" at board \"{{board-name}}\" moved to Archive\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"swimlaneId": "{{swimlane-id}",
"description": "act-archivedSwimlane"
}
```
### Remove swimlane
```json
{
"text": "{{wekan-username}} act-removeSwimlane\nhttp://{{wekan-host}}/b/{{board-id}}/{{board-name}}",
"boardId": "{{board-id}}",
"user": "{{wekan-username}}",
"swimlaneId": "{{swimlane-id}",
"description": "act-removeSwimlane"
}
```