added readme

master
ermisw 2024-02-09 09:44:32 +01:00
parent b1e0651885
commit 873457402f
1 changed files with 82 additions and 0 deletions

82
Readme.md Normal file
View File

@ -0,0 +1,82 @@
# BHOM Webhook for Derdack
# Environment vars
This project uses the following environment variables:
| Name | Description |
| ----------------------------- | ------------------------------------|
|bhome_access_key | generated bhom access key |
|bhome_access_secret_key | generated bhom secret key |
environment varibales could also be set in .env File:
```
bhome_access_key=XXXXXXXXXXXXXXXXXXXXXXXXX
bhome_access_secret_key=XXXXXXXXXXXXXXXXXXXX
```
# Pre-requisites
- Install [Node.js](https://nodejs.org/en/) version 16.0.0
# Getting started
- Clone the repository
```
git clone <gitea url> <project_name>
```
- Install dependencies
```
cd <project_name>
npm install
```
- Build the project
```
npm run build
```
# Deploy to Enterprise Alert
{PATH}/Enterprise Alert\ConnectorHost\OutboundWebhooks\{IntegrationName}
# Default configuration
```
var defaultConfig = {
"acknowledge": {
"active": true,
"note": "EA: Event was acknowledged by user {{user.username}} and owner set",
"body": {
"status": "ACK",
"user_assigned": "{{user.username}}"
}
},
"close": {
"active": false,
"body": {
"eventIds": [
"{{alert.externalEventId}}"
],
"slots": {
"notes": "EA: Event was close by user {{user.username}}"
}
}
}
};
```
# Override default configuration
Create a config.json file to override default settings.
Every default setting can be overriden!
Example: activate close response:
```
{
"close": {
"active": true,
}
}
```