Skip to content

A small server that saves incoming webhook JSON objects and makes them queryable over HTTP.

Notifications You must be signed in to change notification settings

simon3z/webhook-logger

Repository files navigation

Webhook Logger

This simple server accepts incoming JSON objects over HTTP, stores them in a database, and makes them queryable by index via HTTP.

Build

go build

Run

./webhook-logger

Send JSON objects

curl -v -XPOST -d '{"foo": "bar"}' http://localhost:9099/append

Retrieve objects

Retrieve all objects:

curl http://localhost:9099/get

Retrieve all objects with entry index >= 3 for generation ID 3f8e1781-b755-4f6a-8855-94eb20b00dc6:

curl 'http://localhost:9099/get?generationID=3f8e1781-b755-4f6a-8855-94eb20b00dc6&fromIndex=3'

The generationID query parameter is expected to match the generationID value returned from any /get requests. If it does not match, all entries are returned instead of just the ones starting from fromIndex. The generation ID is created when the tool's database is first initialized.

About

A small server that saves incoming webhook JSON objects and makes them queryable over HTTP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published