pushbits / server

A simple server for push notifications via Matrix (and a minimalistic alternative to Pushover and Gotify) 🚀📯
https://www.pushbits.io
ISC License
305 stars 18 forks source link

Simpler API endpoint #56

Closed ThinkChaos closed 2 years ago

ThinkChaos commented 2 years ago

Hi,

pushbits looks quite interesting, and the idea of having /alert work with AlertManager is pretty cool!

For simpler use cases like sending a notification from a shell script, a simpler endpoint would be nice. Is this something that has been considered?

eikendev commented 2 years ago

Hi @ThinkChaos, thanks for opening this issue. I can offer you the /message endpoint:

curl \
    --header "Content-Type: application/json" \
    --request POST \
    --data '{"message":"my message","title":"my title"}' \
    "https://pushbits.example.com/message?token=$PB_TOKEN"

Details are available in the documentation.

ThinkChaos commented 2 years ago

Sorry, I completely missed that! Must've gotten confused since I was comparing a bunch of different solutions. Thanks for pointing me in the right direction!