Skip to content

Commit 0457cee

Browse files
committed
Initial release and updated Discovery page for Deta Space.
1 parent fe0984c commit 0457cee

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

Discovery.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ homepage: "https://tcollis.co.uk/2023/hookstack/"
99

1010
This service allows webhooks to be **Pushed** (submitted) and saved, and then **Pulled** (retrieved) at any time in the future. The webhooks can be tagged with a source system identifier (source-id), and then downloaded by source system, this allows different processes or tools to download the webhooks from specific systems.
1111

12-
This app was created because I wanted to use webhooks with self-hosted apps and did not want the requirements of installing agents, opening firewall ports, needing a static IP or worrying about system uptime to ensure nothing is missed.
12+
This app/service was created because I wanted to use webhooks with self-hosted apps and did not want the requirements of installing agents, opening firewall ports or needing a static IP and having the system be available 24/7 to ensure no webhooks are missed. There are many services (free and chargeable) that provide a webhook relay service, but the ones I looked at just relayed the information to another webhook, which did not solve my problem.
1313

14-
There are many services (free and chargeable) that provide a webhook relay service, but the ones I looked at just relayed the information to another webhook and many required agents or opening of ports, which did not solve my problem.
14+
This service can also be used with some cloud hosted automation services that do not allow webhooks but do allow scheduled get requests (e.g., Microsoft Power Automate).

README.md

+21-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
# HookStack
2+
13
![HookStack](https://github.com/tomcollis/HookStack/blob/main/img/HookStack-Banner.png?raw=true)
24

3-
# HookStack
45
[![Buy me coffee](https://img.shields.io/badge/Buy%20me%20-coffee!-orange.svg?logo=buy-me-a-coffee&color=795548)](https://paypal.me/TomCollisUK/2)
56
[![GitHub stars](https://img.shields.io/github/stars/tomcollis/HookStack)](https://github.com/tomcollis/HookStack/stargazers)
67
[![GitHub issues](https://img.shields.io/github/issues/tomcollis/HookStack)](https://github.com/tomcollis/HookStack/issues)
@@ -14,6 +15,7 @@ This service allows webhooks to be **Pushed** (submitted) and saved, and then **
1415
This service can also be used with some cloud hosted automation services that do not allow webhooks but do allow scheduled get requests (e.g., Microsoft Power Automate).
1516

1617
___
18+
1719
## Environment Variables
1820

1921
To run this code, you will need to provide following environment variables, you will be prompted automatically when using [Deta Space](https://deta.space/).
@@ -23,17 +25,19 @@ To run this code, you will need to provide following environment variables, you
2325
`API_KEY` - you can use anything or generate something 'secure' at [keycdn Tools](https://tools.keycdn.com/sha256-online-generator)
2426

2527
___
28+
2629
## Deploy to [Deta Space](https://deta.space/)
2730

28-
This app has not yet been published to Deta Space.
31+
[Deta Space - v0.0.10](https://deta.space/discovery/r/d3ym5spf7cytxjsy)
2932

30-
You will automatically be prompted to enter the required environment variables.
33+
You can configure the required API key in app settings.
3134
All data will be private in your own account.
3235

3336
___
37+
3438
## API Reference
3539

36-
#### Post Webhook
40+
### Post Webhook
3741

3842
```http
3943
POST /p
@@ -45,7 +49,7 @@ ___
4549

4650
All data is stored in your [Deta Space](https://deta.space/) account in a Deta Base called 'HookStack'. This means your data is not available for me or anyone else to see, but do not forget it is only protected by your API key. Your API Key is not required to post data.
4751

48-
###### Example
52+
#### Example
4953

5054
```http
5155
POST /p?source=system-name
@@ -71,6 +75,7 @@ The BODY data can be in any format, with as many or as few fields as you want. T
7175
"source": "system-2"
7276
}
7377
```
78+
7479
This response is what is stored in the Deta Base:
7580

7681
| Parameter | Type | Description |
@@ -81,18 +86,19 @@ This response is what is stored in the Deta Base:
8186

8287
___
8388

84-
#### Get items for source system by id
89+
### Get items for source system by id
8590

8691
```http
8792
GET /webhooks/$source
8893
```
94+
8995
This will return all webhooks from the system with a matching source key and delete all corresponding results from the Deta Base by design to minimise the length of time your data is stored online.
9096

9197
| Parameter | Type | Description |
9298
| :-------- | :------- | :------------------------- |
9399
| `api-key` | `string` | **Required**. Your API key |
94100

95-
###### Example Response
101+
#### Example Response
96102

97103
```http
98104
GET /webhooks/system-2?api-key=verysecure
@@ -123,11 +129,12 @@ This will return all webhooks from the system with a matching source key and del
123129

124130
The webhooks received are returned in an array called 'items', this means they can be processed through another application.
125131

126-
#### Get items for source system unknown
132+
### Get items for source system unknown
127133

128134
```http
129135
GET /webhooks
130136
```
137+
131138
This will retrieve all webhooks posted without a source key, it will also delete all corresponding results from the database by design.
132139

133140
| Parameter | Type | Description |
@@ -137,16 +144,19 @@ This will retrieve all webhooks posted without a source key, it will also delete
137144
The responses are the same as the above request with the included system-id.
138145

139146
___
147+
140148
## Feedback
141149

142150
If you have any feedback, you can:
143151

144-
[![](https://img.shields.io/static/v1?label=Message%20on&message=Telegram&color=27A7E7&logo=telegram&style=for-the-badge)](https://t.me/tomcollis)
152+
[![Message Me](https://img.shields.io/static/v1?label=Message%20on&message=Telegram&color=27A7E7&logo=telegram&style=for-the-badge)](https://t.me/tomcollis)
145153

146154
or
147155

148-
[![](https://img.shields.io/static/v1?label=Create%20New&message=Issue&color=4EC820&logo=github&style=for-the-badge)](https://github.com/tomcollis/HookStack/issues)
156+
[![Create Issue](https://img.shields.io/static/v1?label=Create%20New&message=Issue&color=4EC820&logo=github&style=for-the-badge)](https://github.com/tomcollis/HookStack/issues)
149157

150158
___
159+
151160
## Acknowledgements
152-
- This was a sample app, used as my starting point. [ExpressJS Example - Simple Web API](https://github.com/expressjs/express/blob/28db2c2c5cf992c897d1fbbc6b119ee02fe32ab1/examples/web-service/index.js)
161+
162+
This was a sample app, used as my starting point. [ExpressJS Example - Simple Web API](https://github.com/expressjs/express/blob/28db2c2c5cf992c897d1fbbc6b119ee02fe32ab1/examples/web-service/index.js)

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"url": "git+https://github.com/tomcollis/HookStack.git"
1717
},
1818
"main": "index.js",
19-
"version": "0.0.7",
19+
"version": "0.0.10",
2020
"license": "GPL-3.0",
2121
"dependencies": {
2222
"deta": "^1.1.0",

0 commit comments

Comments
 (0)