-
Notifications
You must be signed in to change notification settings - Fork 140
Description
Question
How is formatted keys of json to notification via generic webhook.
Context / what you've tried
Hello,
I see implementation of shoutrrr but i'm using apprise-api since many years now and configured on tooooo many usages :)
I search to use webhook to push on my apprise server, and on doc of apprise, it's possible to send a similar call of shoutrrr Generic :
Apprise-api : Here is the JSON Version and tests out the Stateless query (which requires at a minimum the urls and body:
We also convert subject to title too:
curl -X POST -d '{"href": "mailto://user:pass@gmail.com", "subject":"My Title", "payload":"Body"}'
-H "Content-Type: application/json"
"http://localhost:8000/notify/{KEY}?:subject=title&:payload=body&:href=urls"
The colon : prefix is the switch that starts the re-mapping rule engine. You can do 3 possible things with the rule engine:
:existing_key=expected_key: Rename an existing (expected) payload key to one Apprise expects
:existing_key=: By setting no value, the existing key is simply removed from the payload entirely
:expected_key=A value to give it: You can also fix an expected apprise key to a pre-generated string value.
Source : https://github.com/caronc/apprise-api#third-party-webhook-support
It's "similar" but title and message keys are predefined :
Using generic://example.com?$projection=retroazimuthal would yield:
{
"title": "Amazing opportunities!",
"message": "New map book available for purchase.",
"projection": "retroazimuthal"
}
https://shoutrrr.nickfedor.com/v0.13.2/services/specialized/generic/#custom_data_fields
Idea, it's to know how pass good key on url to good format for apprise
I have tested to :
apk add curl
and after on container zerobyte :
curl -X POST
-F "body=Test Message"
-F "tags=all"
http://apprise.url/notify/mykey
It's works perfectly :)
For me, it's possible to use generic with good keys with json (or push curl and permit to use previous call ;) )
(-F attach= is not necessary here for me, last option can be used for apprise via curl)
Regards,
Eric.