The service stores any JSON POST request to the database and allows to view request history with GET request.
- allows to group webhook logs under
/api/{entity}
- allows to access stored request by ID
- stores request headers
- Store any payload:
$> curl -X POST https://sleepy-reaches-84241.herokuapp.com/api/example -H 'Content-Type: application/json' -d '{"paymentId": "abcde", "status": "pending"}'
- List stored requests
curl https://sleepy-reaches-84241.herokuapp.com/api/example
- List and limit requests
curl https://sleepy-reaches-84241.herokuapp.com/api/example?limit=3
- Get a single request by ID
curl https://sleepy-reaches-84241.herokuapp.com/api/example/611b7d4c-cbb1-4e18-9ebe-cc53829d22b0
docker build -t webhook-logger .
docker run --rm -e DATABASE_URL=$DATABASE_URL -p 8000:8000 webhook-logger
$> docker-compose up
- store headers
- add get entity by ID endpoint
- accept limit param for number of entities
- (?) delete records older then X days
- run locally with docker-compose
- show stats:
...{stats: {distinctNames: N, total: M}}, schemaVersion: 3, ...
- add endpoint descriptions